instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Good night, I was trying to benchmark the performance of HashSet and List datatypes in C# to check which one performs best when a lot of insertions/deletes need to be done. The code I am using is roughly the following. public static Func<String, HashSet<String>> ListaPossiveisCorreccoes = StrPalavra => { (...)...
stackexchange/codereview
i am currently building a website and was relying on php fetch_content to read file this (http://opi.yahoo.com/online?u=yahooid&m=a&t=1) and it returns 00 for offline and 01 for online. Somehow i moved my hosting n the new hosting can't do php_fetch_content, is there is any way for jQuery to do this? i've tried .get()...
stackexchange/codereview
Hi I am sending email attachments (using php) and would like to point out to the people that I send the emails to that there are attachments. I want to do this by displaying a link in the html body of the email, so all they need to do is click the link and there system will try and open/view the attachment. Does anyon...
stackexchange/codereview
I am following the demo over here http://jquery.bassistance.de/validate/demo/marketo/ On submitting the form, if the field is empty, how are the input boxes and other fields getting that red border around them? What is it I have to add in my plugin decleration to get that? Update $("#profile_form").validate({ r...
stackexchange/codereview
I'm currently in the process of creating a shared Edit/Create view for my game review project and have hit a snag. Each game can be a title on a variety of platforms. I have this mapped as a many-to-many relationship in my EF4 model. For my view, I'd like to have a series of checkboxes with the names of each platfor...
stackexchange/codereview
I'm trying to getting this http://www.forgottenexpanse.com/projects/ci_reader CodeIgniter library for interacting with Google Reader to work. When following the examples on the page, this works fine: $this->load->library('reader'); $shared_items = $this->reader->shared_items('12006118737470781753'); foreach ($shared_i...
stackexchange/codereview
I want to display a message to the users of my app in the UIStatusBar, but I'd like to maintain the scrollsToTop functionality so a user can tap on the statusbar and scroll a tableView up to the top. I've looked into adding a UIWindow on top of the current status bar as in this question: Add UIView Above All Other Vie...
stackexchange/codereview
I have written a some C code running on OS X 10.6, which happens to be slow so I am using valgrind to check for memory leaks etc. One of the things I have noticed whilst doing this: If I allocate memory to a 2D array like this: double** matrix = NULL; allocate2D(matrix, 2, 2); void allocate2D(double** matrix, int nrow...
stackexchange/codereview
I know that there are several questions around this exception on SO, but nothing seen that helps me. I have following query giving me a "Multi-part identifier 'claim.fiData' could not be bound"-Exception: SELECT claim.idData FROM tabData as claim INNER JOIN dbo._previousClaimsByFiData(claim.fiData) AS prevClaim ON...
stackexchange/codereview
I declared a Normal Structure In C: typedef struct arr_struct{ int* original; int size; int first[size/2]; int second[size-(size/2)]; }; when compile it gives me: test.c:11: error: ‘size’ undeclared here (not in a function) any explanation?
stackexchange/codereview
Are there any C-language static analysers out there that create graphical diagrams of the data structures in a body of C code? I'm thinking along the lines of the data displays in the DDD (Data Display Debugger) but that work from static analysis of the source code. Any diagram notation welcome (UML etc.) and it can ru...
stackexchange/codereview
I have installed Visual Studio 2008 on our build machine because we want to build the setup project to create MSI installer for our C# application. From IDE, it works fine. The installer is created as expected. Switch to command line, with the follow command the process finished without any error but there is no outpu...
stackexchange/codereview
I am converting a simple flash 'drumset' application to support TUIO multitouch using the tuio as3 reference implementation from http://www.tuio.org/?flash As a quick and dirty solution, i am trying to trigger an artificial MouseEvent, but nothing seems to happen :( where is my error? is this even possible? thanks alre...
stackexchange/codereview
I'm pretty new to event-based programming (using node.js). I believe that there's something I'm just not grokking about it, because there's a particular problem that I keep coming across again and again and again. In short, that problem is dealing with asynchronicity when it seems to be getting in your way. This most ...
stackexchange/codereview
I am trying to use JQSlickWrap, I have all .js files required and Jquery files as well. but still it doesn't work with modern browsers like Chrome. I have tested many canvas example and other html5 examples in this browsers and they all work fine. Edit: Added my code <head> <title>jQSlickWrap Demo 3</title> <...
stackexchange/codereview
In my batch file I have the script: set myVar=/someLabel:"%1" I want to write the if command for the above script that have the same meaning as below. if <%1 not null> { myVar=/someLabel:"%1" } else { myVar="" } How can I do this? [Edit] The answer from user hfs works for me. The full details of the if and set c...
stackexchange/codereview
Do you know a Wordpress plugin that provides the ability to group subscribers? It would be nice if there was a page for each group where a photo and some information can be inserted. The final website will be for a basketball club. So I need the groups as the teams. I haven't found anything so far.
stackexchange/codereview
I'm working on a site and created this experimental script which populates a category menu dynamically based on the database entry. It worked for a day and then suddenly stopped. I changed my includes for requires and it gave me this error message Fatal error: Maximum execution time of 30 seconds exceeded in /home1/ad...
stackexchange/codereview
Unfortunately, this may not be a valid Code-Golf question as it is likely Javascript only; however, since this is likely to be the only useful-in-the-real-world code-golf contest I'm going to go ahead and post it. The Google Analytics Asyncronous Tracking snippet is used by many websites. The script goes a little some...
stackexchange/codereview
I would like to know when entities in a certain database table are either created or updated. The application is essentially a CMS, and I need to know when changes are made to the content so that I can reindex them for searches. I know that the autogenerated LINQ to EF class has overridable methods for when certain fi...
stackexchange/codereview
The git clone help page has this to say about --mirror: Set up a mirror of the remote repository. This implies --bare. But doesn't go into detail about how the --mirror clone is different from a --bare clone.
stackexchange/codereview
I have to upload video on facebook using iphone sdk 4.0 or above. Here is the code I am using: FBRequest m_UploadRequest = [[FBRequest requestWithSession: _session delegate: self] retain]; NSURL *videoUrl=[NSURL URLWithString:@"clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]; NSData VideoFileData = [NSData dataWithConte...
stackexchange/codereview
I have a custom UISegmentedControl that I placed using IB into a Navigation bar much like it is done in the iTunes App. When the device is rotated in landscape mode, I want to repopulate the segmented control to make use of the more space I have there. I do: CGFloat controlWidth = self.frame.size.width; where self is t...
stackexchange/codereview
$j=1; ?> var t =''; var options = ""; </script> <?php foreach ($this->data['DEFAULTS'] as $rec){ foreach ($rec as $key=>$val){ ?> <script type="text/javascript"> var cntr = "<?php echo $j;?>"; ...
stackexchange/codereview
I'm using the Wix 3.5 Votive (visual studio integration) to author an installer for some COM objects. In Votive, setting a project reference pulls in the binaries from that project and automatically generates the Wix source at compile time. This is absolutely great, it is DRY and means I don't have to constantly update...
stackexchange/codereview
Is there way to add, edit or delete records manually in sqlite database in Android Eclipse emulator? Thanks
stackexchange/codereview
I just installed windows 7 64 bit I cannot debug an app in Visual studio using the Cassini web server. I have attempted to use firefox, chrome and IE and nothing will let me connect in debug mode. As anyone seen this issue before? All make it appear as though the website does just not exist. EDIT: I cant even get a a...
stackexchange/codereview
I have a Binding in a inline style for the DataGridRowGroupHeader like this. <sdk:DataGrid.RowGroupHeaderStyles> <Style TargetType="sdk:DataGridRowGroupHeader"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="sdk:DataGridRowGroupHeader"> ...
stackexchange/codereview
Is it possible to create a log4net custom PatternLayoutConverter that allows an "index" value to be configured? I know about the "property" conversion string that allows you to write code like this: ThreadContext.Properties["ID"] = yourID; And specify like this: %property{ID} That the value should be included in th...
stackexchange/codereview
I want to know how block the acess to futon (_utils) in couchdb for readers, allowing the access only for admins. I need to do this why if a reader user acess the futon he can see the name of all my databases and how many documents there are. My application should let a reader acess an document only if he have the id o...
stackexchange/codereview
I want to take a csv export of my bibtex literature database and analyse the correlation between keywords and Journals. I start off with a csv file containing one row per piece of literature, each one with a Journal name, and a keyword list, which is a slash deliminated list. I want to end up with either a matrix of ...
stackexchange/codereview
I have a javascript that takes about 2 seconds to execute (complex optimization algorithm). I want to set certain span to "working..." at the beginning of the function. I observe that the span doesn't change until the end of the function. How can I force DOM changes propagation? or should I approach this differently al...
stackexchange/codereview
I am currently developing a game in which a player plays slot machine.The game is based on that the user stops in money, 100sek, 300sek or 500sek. Then the user makes a bet for each game. The one-armed bandit randomly spits out 3 different symbols in nine pieces fields. See figure: The goal of the game is to obtain as...
stackexchange/codereview
I found the following code for showing the selected item in a treeview when focus has left, but I'm having trouble moving the code to App.xaml so any UserControl could use it. This does what I want <TreeView x:Name="trviewArchives" Width="141" Height="154" Canvas.Left="20" Canvas.Top="167" Background="{x:Null}" Bord...
stackexchange/codereview
I have a web application which among other things contains a table of items created using an Ajax callback. A bunch of form fields at the top of the table allow me to filter the items that will be displayed in the table according to various criteria and show it. Some parts of the table have lists of items with an [X] ...
stackexchange/codereview
I am having an issue in setting up a one to many relationship in my annotated object. I have the following: @MappedSuperclass public abstract class MappedModel { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="id",nullable=false,unique=true) private Long mId; then this @Entity @Table(na...
stackexchange/codereview
Hey everyone, I am getting a compile error in my code, and I cannot figure out what to do. Here's the block: #include <stdio.h> #include <string.h> /* * Function to return index at which team ID input is stored */ int getIndex(char* id, char* idList[][50]) { int k; for (k=0; k<50; k++) { if (strcm...
stackexchange/codereview
I have a two column view Product Id Tag ---------------------- 1 Leather 1 Watch 2 Red 2 Necklace 2 Pearl I'm trying to get all possible combinations of tags for a product as such: 1 Leather 1 Leather,Watch 2 Pearl 2 Pearl,Ne...
stackexchange/codereview
I currently have an iframe for a facebook application and I am using FB.Canvas.setAutoResize(); to resize it properly. The problem is when a user scrolls down and clicks on one of the lower links, it does not a way to bring the user back to the top. Is there a function or way of bring a user back to the top of the pag...
stackexchange/codereview
I have a map in my application that shows locations from Gowalla. I use an ItemizedOverlay with a simple default marker, but as the items are drawn, I swap the default marker out with the location's icon downloaded 9and cached on disk) from Gowalla. The problem is that if there are a lot of locations on screen (say 30...
stackexchange/codereview
How can I get current system IP using c under window XP.
stackexchange/codereview
I have a Windows Service Solution and am trying to add a service reference to a Hermes(Opensource ebms message server) Web Service in VS2010. I can find the Web Service using it's URL, but when I try and populate the Service reference I get the following errors in Visual Studio: Error 8 Custom tool error: Failed to gen...
stackexchange/codereview
So, LIMIT 50000,1 won't work well? Then, how come? What to do if rows after several rows are required? I read it at http://www.mysqlperformanceblog.com/2006/09/01/order-by-limit-performance-optimization/
stackexchange/codereview
I am using the ms proprietary css property "filter" to control the opactiy of an element. #square2 { filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)"; zoom:1; padding:10px; border:solid 5px #0cc; height:200px; width:400px; background-color:#cc0; color:#c0c; font-size:2em;...
stackexchange/codereview
I am using git 1.7.2.3 via cygwin on Windows 7 and seeing strange artifacts appearing in some of my source files when switching branches. git status reports everything as unchanged yet they crazy characters are present. I've confirmed on GitHub that the files are as they should be in the repo. My Copy: ਍        ⼀⼀⼀ 㰀猀甀...
stackexchange/codereview
I have huge huge matrices and I want the output of the matrix to be of the same size as input matrix, just with each cell getting sum of numbers from adjacent cell. Can you guide me how to approach it on a GPGPU platform using CUDA?
stackexchange/codereview
I am setting out to create an app that will watch a directory for any files created. pretty straightforward time to use a filesystemwatcher. My question relates to how to utilize it. Is it common practice to use a windows service to ensure the application is always running? i have been trying to get away from buildi...
stackexchange/codereview
Hey Guys, I am writing a performance monitor program that keeps track of different things, one of them being the Memory Available. I have been able to use this same code to find out the min,max, and average for the other Performance Counters, but this one keeps giving me the wrong Average. The first average is correct,...
stackexchange/codereview
I have been struggling with this problem for many days. please help me.. In my android application i am trying to download images from remote server dynamically ( no of images dynamically come ). for downloading all images it is taking 30 to 40 seconds mean time user has to wait to see the activity . But it is the wor...
stackexchange/codereview
How to post on facebook account wall when any blog post made from wordpress. I allready tried with various wordpress plugin like "wordbook", "wordbooker" etc but none of them working fine........ any idea or alternative way?
stackexchange/codereview
My system consists of two user types - Students and Tutors. - Tutors can create classes and packs - Both Students and tutors can purchase classes and packs Following are the tables involved Groups Users- Contains common fields of both user types Tutor_Details- Tutor specific fields WebClasses - Classes created by...
stackexchange/codereview
My objective is to generate sine, square, triangle and sawtooth signals with Android's AudioTrack Class. I have made an attempt based on a tutorial. It works relatively well, although I'm not always sure how accurate the frequency generated corresponds with the frequency aimed at. I would like to make square, triangle...
stackexchange/codereview
I can use dynamic find_by_* methods in rails, such as Company.find_by_name_and_zip_and_phone, but how can we use a multipart property in it? Such as the update_at property, when I try to use Company.find_by_name_and_zip_and_phone_and_update_at, i got an error: NoMethodError: undefined method `find_by_state_and_name_and...
stackexchange/codereview
I'm finding a way pausing program execution by code on Xcode As an example, I can stop execution with abort() C function. This pops Xcode debugger up. However, this exits program completely, so I'm finding a way to pause execution. So I can resume execution after checking execution states. This is required for handling...
stackexchange/codereview
How come this is not possible? I am getting illegal start of expression. (s1.charAt(i) == ' ') ? i++ : break;
stackexchange/codereview
http://www.codeproject.com/KB/IP/SocketFileTransfer.aspx?artkw=socket%20send%20a%20file I don't clearly understand this line : // get the file's size first cbLeftToReceive = sizeof( dataLength ); do { BYTE* bp = (BYTE*)(&dataLength) + sizeof(dataLength) - cbLeftToReceive; cbBytesRet = sockClient.Receive( bp, ...
stackexchange/codereview
Hey, Im trying something in android, that has to get the words sent in sms and print on the emulator screen. But the app doesnt update in time. I send a message. Ok. But when I open the app it doesnt print the words that I've sent. So i have to close the emulator and then open it again, and run the app, and the word is...
stackexchange/codereview
Is jquery 1.3.2 conflicting with jqueryui 1.8.4? I get the error "Too much recursion" (using the code below). When I combine jquery 1.3.2 with jqueryui 1.7.2 I don't get this error, but it breaks my code... Is there somewhere a reference table which jquery version works with which jqueryui code? <html> <head> <title>Th...
stackexchange/codereview
I want to select the text in a paragraph when I click or double click the <p> tag. Not highlight, just like using mouse to make a select area to choose text to be selected! I have several paragraph and *.rar file link addresses on the page, and I want to select all the text when I click on one of them. I think the text...
stackexchange/codereview
I am trying to implement a simple log using Nlog 1.0, using the following code Dim _logger = LogManager.GetCurrentClassLogger() _logger.Debug("Iain") And the following NLog.config. <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/X...
stackexchange/codereview
Been trying to get my project up and running on an Ubuntu Virtual Box machine. Everything works fine from the terminal, but when I try to run my application from Netbeans I get the following error: => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 /home/soroush/.gem/ruby/1.8/gems/rails-2.3.5...
stackexchange/codereview
Im having a small issue today.. I am trying to create an aui as shown in the demo program of the wx module. The size of the actual tabs will not change no matter what I do. They stay at about 400 by 50 and I can't understand why. I think it may be when I call Manager = wxAuiManager:new([{managed_wnd, Panel}]), I need ...
stackexchange/codereview
i am using asp.net 4.0 iis 7.5 microsoft visual studio 2010 what i want is keep whole page (browser) scroll position (not a div or panel) when asynchronous postback happened (update panel) how can i do this actually i had a function which can keep div scroll bar position after postback like this <script type="te...
stackexchange/codereview
I analyzed the code I am working on using a Java source code analyzer. One of the warnings is "Always declare user defined exceptions as final". There are many other warnings that doesn't make much sense but this one made me a little bit confused. I am working on a framework and I have one root generic exception (say ...
stackexchange/codereview
Currently I am struggling with a very annoying problem, namely when I deploy my .net 2.0 application on Windows XP (without any SP) I am receiving a CreateProcess error with error code 14001. When I looked in the event log, I noticed there is a problem with the syntax of manifest or policy file. I tried to find such f...
stackexchange/codereview
are there any way to duplicate the resources produced by functions such as mysql_query? it may sound dumb but i wanted to reuse such resources so that i won't retype the mysql_query() again and again just to use have a resource..like for example $rsrc = mysql_query('SELECT * FROM `table` LIMIT 0,1'); $rows = mysql_fet...
stackexchange/codereview
I'm developing an analytics website and I need a powerful and the most up to date database of IP addresses and countries ISO (us, fr, tn, ca...). I found a lot out there but I can't pick out the best one. Anyone to advise me please? Thank You.
stackexchange/codereview
Does python have some undefined variable / debug mode which will output a notice/warning? PHP allows you to modify the error_reporting to turn on notice warnings which mean doing <?php echo $foo; will throw an "Undefined variable foo on line 2....... does python have something similar? I had a bug where I was doing db...
stackexchange/codereview
I need to make running multiple Perl scripts as easy as possible, and make all of their statuses easily known, to see if they are all still working. I'm thinking of having a single Perl script which runs and monitors the other scripts I have, and displays the data on a 'master' command prompt. Is this possible? Is ther...
stackexchange/codereview
I have the following problem. I got a class PluginLoader which oversees loading of plugins. It divides sub-stages of work to other classes like Plugin. Plugin calls functions of PluginLoader in its processing. Let's call that function AddData. Here, PluginLoader has to check if the data it receives is duplicate. For th...
stackexchange/codereview
It appears that Android doesn't offer such a useful widget. However, my screen design requires a view like this: Also, the interaction design requires that such boxes are displayed and hidden, depending on other data. Of course, I could construct such box from separate elements in my XML layout (e.g. from a shape and ...
stackexchange/codereview
I currently have a form with a single file upload input on it. the original form input I've tried <input type="file" name="userFile[]" /> and <input type="file" name="userFile1" /> I also have a link to generate more input fields using If have tried methods of: a) counter = 1; function addInput(){ coun...
stackexchange/codereview
I want to create a 5 reels slot machine calculation system and I'm not sure what approach to take. I understand that there is a lot of math within it, especially if I want the machine to be enjoyable to a player. Are there any tips/links for that? Was looking for info at the web but they discuss on it from the player's...
stackexchange/codereview
I would like a list of advantages/disadvantages of J2ME, mainly MIDP. I figured that this would be the best place to ask since there seems to be a wealth of knowledge in this forum. Currently I have the following advantages in J2ME., * Rich Clients * Offline use * Consistency of applications across platforms * Reuse of...
stackexchange/codereview
I have developed a C# 3.5 Mvc 1.0 application using oracle 11gR2 client which uses odp .net 2.112.1.0. I want to deploy it in my IIS7 server which has oracle client 10g which uses odp.net 2.102.2.20 . I am getting the following error Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=ne...
stackexchange/codereview
There are a lot of Android SDK APIs where callback handlers are registered. For a concrete example, with MediaPlayer you can set an onCompletionListener callback. Will these callbacks be called from the main (UI) thread? If the answer is "it depends", then I'm looking for some general rules for what callbacks will b...
stackexchange/codereview
This is what I need to do on a server. Let's say that I have 3 video files: video1.avi 2 minutes -> 640x320 video2.avi 1 minute -> 640x320 video3.avi 1 minute -> 640x320 I need to create video4.avi, that will be 2 minutes long and 1280x320, Containing the videos side by side (horizontally).I need video2 and video3 to ...
stackexchange/codereview
I'm trying to duplicate two inputs and add the Eyecon Color picker to duplicated inputs. After duplication, when i'm trying to click on the input add select a color, the color is assigned to the previous input, not to the current one. Thank you. <link rel="stylesheet" href="ui.css" type="text/css" media="screen" /> <sc...
stackexchange/codereview
I want to get list of installed windows hotfix and updates. I use script below: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colQuickFixes = objWMIService.ExecQuery _ ("Select * from Win32_QuickFixEngineering") Set objDateTime...
stackexchange/codereview
PHP: function generate_uid() { $uid = mt_rand(); $sql = "SELECT user_id FROM user_registration"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } $result = mysql_query($sql); $availability = TRUE; while($row = mysql_fetch_array($result)) { if($ro...
stackexchange/codereview
I goofed up a merge. I'd like to revert then try again. Is there a way to revert a merge before it is committed? hg revert doesn't do what I'd like, it only reverts the text of the files. Mercurial aborts my second attempt at merging and complains original merge is still uncommitted. Is there a way to undo a merge af...
stackexchange/codereview
I would like to share a url from my android application. I would like to share this url through the installed applications in my device(bluetooth, facebook, google mail, messaging etc.). Given below is the code import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Vi...
stackexchange/codereview
I have a problem with deleting a record from my SQLite3 database: conn = sqlite3.connect('databaza.db') c = conn.cursor() data3 = str(input('Please enter name: ')) mydata = c.execute('DELETE FROM Zoznam WHERE Name=?', (data3,)) conn.commit() c.close Everything is OK, no errors, but the delete function doesn't work! Do...
stackexchange/codereview
I want to use the Graph API. And I want to load them into a UITableView. Also loading entire user details is slow... Is there a way that I can make it faster? One more thing: Is there a way that I can load a page on Facebook in the login window that is provided by the Facebook iOS SDK after the user logs in? Pretty muc...
stackexchange/codereview
okay so i got a script that removes "_" and replaces it with a space " " and it does not work i even used ereg_replace and eregi_replace none worked yet it works backwards( " ","_") thanks a lot here is the script: $namefixed = preg_replace("/_/", " ", $name); and even $namefixed = preg_replace("_", " ", $name);
stackexchange/codereview
i have to align text by middle in android alertdialog. but i cannot find way... anyone knows how to this?
stackexchange/codereview
When I click a button I want to show or keep a hidden button hidden depending on whether the device has an internet connection or not. I have googled some but haven't found any really good example yet, do you know of any? I want something like $('#btnPrepareSynch').click(function () { checkConnection(); }); function ...
stackexchange/codereview
Is there a way to simulate whether permission are granted or denied to use services like location on the Windows Phone 7? I want to get the users current location, but I can't seem to find away to make the phone show me the permissions dialog so that I can deny access to it for testing? Anyone else have these kinds of ...
stackexchange/codereview
I am using google-api-client to access Google calendar. Following are the permissions in my manifest file. <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <us...
stackexchange/codereview
Possible Duplicate: Zend Framework: Controller Plugins vs Action Helpers I know what the difference is technically, and how to register a front controller plugin/action helper, but it would really help me if someone with more experience in zend framework could explain me the different use cases for the two (examples...
stackexchange/codereview
after several attempts, I can not solve this problem. I have the following mysql query: SELECT date_format(connect_time,"%Y-%m-%d %H") AS date, NotConnected, count(id) as calls, sum(`duration`)/60 as minutes FROM test.`CDR_Vendors`, (SELECT ...
stackexchange/codereview
Every once in a while I find myself typing a one-off script to import some CSV data into a database, doing some column logic (e.g. turn column3 into uppercase) and/or field mapping (column2 in the csv goes to column 3 in de database, etc). Is there a nice tool which can do this easier? The least amount of features I'd ...
stackexchange/codereview
I have some conditions and rules in my .htaccess: RewriteCond %{DOCUMENT_ROOT}/assets/img$1/.$2.$4/$3.$4 -f RewriteRule ^assets/img(.*)/[a-zA-Z0-9-_\.]*\.[^/]+\.[a-z]{2,4}$ assets/img$1/.$2.$4/$3.$4 [NC] RewriteRule ^assets/img(.*)/[a-zA-Z0-9-_\.]*\.[^/]+\.[a-z]{2,4}$ assets/img/image.php?path=$1&file=$2.$4&template=$3...
stackexchange/codereview
how can i match a text that is outside of an anchor tag ? example : "test <a>test</a>" i want to get the test outside of the a tags only. thanks.
stackexchange/codereview
I'm using Python along with Pygame which uses pyPortMidi for it's midi module, and I'm currently sending NoteOn and NoteOff messages through Midi Yoke to Ableton live, which works great. But I can't seem to figure out how I send CC messages.. Anyone? The (working) class basically looks like this. class MidiIO: ...
stackexchange/codereview
i am New to flex.Can any one point me to a small piece of mxml code which plays audio files(mp3,wav.....) also which has the capabilities to pause, play, stop.... the audio file. Also this file would be embedded in a html file later on..
stackexchange/codereview
Robot r1,r2,r3; r1=new Robot("Huey",2,3); r2=new Robot("Louie",5,4); r3=new Robot("Louie",5,4); r1=r2; r2=r3; r3=r1; System.out.print(r1==r2); So this program prints false, but I thought it would print true. Its asking if the memory address of r1 is the same as r2. Well r1 is set to equal r2, then r2 is changed to r3,...
stackexchange/codereview
How can I generate byetcode from Ruby 1.9?? My intent is to generate bytecode not the source code and ship it along with my application package. I am aware of the JRuby approach but I am facing certain issues there
stackexchange/codereview
This code works with IE 7 and above, but not with IE6: img.myclass{ opacity: 0.5; filter: alpha(opacity=50); } What should I add to my code? Thanks
stackexchange/codereview
I have an ASP:NET MVC 2 web site that is on SSL. I want to create a cookie like this: FormsAuthentication.SetAuthCookie(validatedUser.UserName, false); FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, validatedUser.SecureToken, DateTime.Now, DateTime.Now.AddMinutes(10), false, String.Empty); ...
stackexchange/codereview