question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
6,238,553
6,239,025
Closing WiFi connections using the Managed API
I'm writing a program using the Managed WiFi API. Here's how I get all the networks in range: void UpdateNetworks() { networks = new List (); WlanClient client = new WlanClient(); foreach(WlanClient.WlanInterface iface in client.Interfaces) { Wlan.WlanAvailableNetwork[] nets = iface.GetAvailableNetworkList(0); foreach(...
Since you're seeing problems only after a certain number of iterations, the problem is likely resource exhaustion of some sort, which sounds like resources aren't getting cleaned up in a timely manner. From the comments above, it sounds like you're not disposing your WlanClient instances, which may be part (or all) of ...
Closing WiFi connections using the Managed API I'm writing a program using the Managed WiFi API. Here's how I get all the networks in range: void UpdateNetworks() { networks = new List (); WlanClient client = new WlanClient(); foreach(WlanClient.WlanInterface iface in client.Interfaces) { Wlan.WlanAvailableNetwork[] ne...
TITLE: Closing WiFi connections using the Managed API QUESTION: I'm writing a program using the Managed WiFi API. Here's how I get all the networks in range: void UpdateNetworks() { networks = new List (); WlanClient client = new WlanClient(); foreach(WlanClient.WlanInterface iface in client.Interfaces) { Wlan.WlanAva...
[ "c#", "wifi" ]
3
2
5,554
2
0
2011-06-04T18:18:08.993000
2011-06-04T19:51:59
6,238,555
6,238,637
Extending base class fields functionality
I have next code that represents graph edges and nodes (simplified for question): public class Node { } public class Edge { public Node Source { get; set; } public Node Target { get; set; } } Now I want to extend this classes for describing mine topology: public class MineNode: Node { public double FanPressure { get; ...
I think generics is the way to go here... Try this: public class Node { } public class Edge where S: Node where T: Node { public S Source { get; set; } public T Target { get; set; } } Then you can extend the Node and Edge classes with: public class MineNode: Node { public double FanPressure { get; set; } } public cl...
Extending base class fields functionality I have next code that represents graph edges and nodes (simplified for question): public class Node { } public class Edge { public Node Source { get; set; } public Node Target { get; set; } } Now I want to extend this classes for describing mine topology: public class MineNode...
TITLE: Extending base class fields functionality QUESTION: I have next code that represents graph edges and nodes (simplified for question): public class Node { } public class Edge { public Node Source { get; set; } public Node Target { get; set; } } Now I want to extend this classes for describing mine topology: pub...
[ "c#", "class", "inheritance", "derived-class" ]
2
1
776
2
0
2011-06-04T18:18:30.337000
2011-06-04T18:36:32.260000
6,238,556
6,238,597
need a script to split and assign values Jquery
I am trying to separate and reassign values in a variable. What I have is #&first=1&second=2 can anyone help with a script that will separate and assign this values to another variable so it would be like var first= val.(first); var second= val.(second); I am new to jquery so I am not even sure if I am using the correc...
You could do something like this: var val = "#&first=1&second=2"; var first = gup(val, "first"); var second = gup(val, "second"); function gup(str, name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(...
need a script to split and assign values Jquery I am trying to separate and reassign values in a variable. What I have is #&first=1&second=2 can anyone help with a script that will separate and assign this values to another variable so it would be like var first= val.(first); var second= val.(second); I am new to jquer...
TITLE: need a script to split and assign values Jquery QUESTION: I am trying to separate and reassign values in a variable. What I have is #&first=1&second=2 can anyone help with a script that will separate and assign this values to another variable so it would be like var first= val.(first); var second= val.(second);...
[ "php", "jquery" ]
3
3
74
3
0
2011-06-04T18:18:40.220000
2011-06-04T18:26:35.050000
6,238,566
6,238,820
wpf convert some xaml to c#
E I received a good answer at the following link, I need to code this though, as I don't have a set value for the number of ellipses. I'm having a hard time converting it to c# and was hoping for some help. The answer was at Start storyboard on a different control on a trigger in WPF. The code:
Something like this: var style = new Style(typeof(Ellipse)); var trigger = new DataTrigger(); trigger.Binding = new Binding("Opacity") { ElementName = "ellipse1" }; trigger.Value = 0.5; Storyboard sb = new Storyboard(); //Add animation to sb, note the attached storyboard properties which are set with static methods: /...
wpf convert some xaml to c# E I received a good answer at the following link, I need to code this though, as I don't have a set value for the number of ellipses. I'm having a hard time converting it to c# and was hoping for some help. The answer was at Start storyboard on a different control on a trigger in WPF. The co...
TITLE: wpf convert some xaml to c# QUESTION: E I received a good answer at the following link, I need to code this though, as I don't have a set value for the number of ellipses. I'm having a hard time converting it to c# and was hoping for some help. The answer was at Start storyboard on a different control on a trig...
[ "c#", "wpf", "xaml" ]
0
3
279
1
0
2011-06-04T18:21:04.507000
2011-06-04T19:08:45.933000
6,238,570
6,238,591
Is this correct assembly?
Can I handle an array like this in assembly? db a 10,20,30,40,50 and then say: mov si,0 and then refer to an element like this mov AX,a[si]
Technically, yes, but it would be more efficient to write mov si, offset a mov ax, [si] One more thing: a is defined as an array of bytes. And ax is 16bit register. So, mov ax,[si] will make ax to contain first two bytes of a (i.e. al=10, ah=20 ). What you probably want is mov al, [si] or mov al, a[si]
Is this correct assembly? Can I handle an array like this in assembly? db a 10,20,30,40,50 and then say: mov si,0 and then refer to an element like this mov AX,a[si]
TITLE: Is this correct assembly? QUESTION: Can I handle an array like this in assembly? db a 10,20,30,40,50 and then say: mov si,0 and then refer to an element like this mov AX,a[si] ANSWER: Technically, yes, but it would be more efficient to write mov si, offset a mov ax, [si] One more thing: a is defined as an arra...
[ "assembly", "x86" ]
1
2
131
2
0
2011-06-04T18:21:44.703000
2011-06-04T18:25:32.880000
6,238,585
6,238,605
How to read big bufferedimage
I am reading a 100 MB picture into my app. It works fine inside Eclipse, but not when I export project to a JAR. Then, I get "Can't read input file!" Since I need to edit it, I used BufferedImage. private String str = "images/1.png"; BufferedImage imageMap; //in constructor imageMap = ImageIO.read(new File(str)); I hav...
Check you working directory if the image is loaded from the file system. Then you see if your relative path "images/1.png" is valid. Or you directly check the path of your png System.out.println(new File(".")); File f = new File("images/1.png"); System.out.println(f.getAbsolutePath());
How to read big bufferedimage I am reading a 100 MB picture into my app. It works fine inside Eclipse, but not when I export project to a JAR. Then, I get "Can't read input file!" Since I need to edit it, I used BufferedImage. private String str = "images/1.png"; BufferedImage imageMap; //in constructor imageMap = Imag...
TITLE: How to read big bufferedimage QUESTION: I am reading a 100 MB picture into my app. It works fine inside Eclipse, but not when I export project to a JAR. Then, I get "Can't read input file!" Since I need to edit it, I used BufferedImage. private String str = "images/1.png"; BufferedImage imageMap; //in construct...
[ "java", "file", "bufferedimage" ]
2
2
891
1
0
2011-06-04T18:24:08.973000
2011-06-04T18:28:07.153000
6,238,594
6,238,635
How to call play-framework script in ubuntu?
I've exported play framework 1.2.1 in my user folder, inside "play-framework" and I'm now trying to run the script but I can't get it to. When I'm inside the directory and simply type "play", it doesn't work, and I also tried renaming it to play.py and calling it with "python play.py", still nothing. Any ideas what I'm...
Run./play from it's directory Or add the directory to your PATH export PATH=$PATH:~/play-framework And.. are you sure you get nothing as a response? Should be some error, like 'command not found'.
How to call play-framework script in ubuntu? I've exported play framework 1.2.1 in my user folder, inside "play-framework" and I'm now trying to run the script but I can't get it to. When I'm inside the directory and simply type "play", it doesn't work, and I also tried renaming it to play.py and calling it with "pytho...
TITLE: How to call play-framework script in ubuntu? QUESTION: I've exported play framework 1.2.1 in my user folder, inside "play-framework" and I'm now trying to run the script but I can't get it to. When I'm inside the directory and simply type "play", it doesn't work, and I also tried renaming it to play.py and call...
[ "ubuntu", "terminal", "playframework" ]
2
4
2,649
2
0
2011-06-04T18:25:51.657000
2011-06-04T18:35:53.300000
6,238,601
6,238,633
ajaxToolkit:CalendarExtender losses data @ postbacks
Frens, i have a textbox with ajaxToolkit:CalendarExtender which losses data when i chose radio buttons.... please read my code...
Your radioButton's AutoPostback attribute(or what it is called) is true that means when you change the choice of radio button the page will post back and which will cause to refresh the UpdatePanel.As long as your radio button and CalenderExtender is on the same UpdatePanel every time OnCheckedChanged="rbtnDisabled_Che...
ajaxToolkit:CalendarExtender losses data @ postbacks Frens, i have a textbox with ajaxToolkit:CalendarExtender which losses data when i chose radio buttons.... please read my code...
TITLE: ajaxToolkit:CalendarExtender losses data @ postbacks QUESTION: Frens, i have a textbox with ajaxToolkit:CalendarExtender which losses data when i chose radio buttons.... please read my code... ANSWER: Your radioButton's AutoPostback attribute(or what it is called) is true that means when you change the choice ...
[ "c#", "asp.net", "ajax", "calendar" ]
1
1
1,289
2
0
2011-06-04T18:27:13.310000
2011-06-04T18:35:36.963000
6,238,608
6,238,616
Android Threading Issue
Here's the situation: I've got some lengthy non-UI code that needs to be run in a ListActivity and then have this ListActivity update the UI to contain a the result of this lengthy method (the list). I need a ProgressDialog to be running until it's finished so the user has some feedback. Here's the code: public class S...
Have you tried AsyncTask? It´s built exactly for having threading AND be able to update things in your UI Thread. Take a look here: http://developer.android.com/resources/articles/painless-threading.html
Android Threading Issue Here's the situation: I've got some lengthy non-UI code that needs to be run in a ListActivity and then have this ListActivity update the UI to contain a the result of this lengthy method (the list). I need a ProgressDialog to be running until it's finished so the user has some feedback. Here's ...
TITLE: Android Threading Issue QUESTION: Here's the situation: I've got some lengthy non-UI code that needs to be run in a ListActivity and then have this ListActivity update the UI to contain a the result of this lengthy method (the list). I need a ProgressDialog to be running until it's finished so the user has some...
[ "java", "android", "multithreading" ]
1
3
98
1
0
2011-06-04T18:29:00.877000
2011-06-04T18:31:03.637000
6,238,613
6,259,050
Support for live preview of Haml in Coda or Espresso?
I just discovered the beautiful Haml and Sass, and want to develop in these languages but with live previews. Coda and Espresso both allow for beautiful live previews of HTML files, but previews of an Haml file simply show it as plain text. While there exist sugars for Espresso that add syntax highlighting, which is ni...
I don't use Espresso, so no comment there. However, Coda does not provide any support for Haml or Sass that I can find. I've been closely following the Coda forums, as I am a paid user, and it looks as though a 2.0 version is forthcoming. Who knows, perhaps that'll be included. For now, since you're not using Ruby on R...
Support for live preview of Haml in Coda or Espresso? I just discovered the beautiful Haml and Sass, and want to develop in these languages but with live previews. Coda and Espresso both allow for beautiful live previews of HTML files, but previews of an Haml file simply show it as plain text. While there exist sugars ...
TITLE: Support for live preview of Haml in Coda or Espresso? QUESTION: I just discovered the beautiful Haml and Sass, and want to develop in these languages but with live previews. Coda and Espresso both allow for beautiful live previews of HTML files, but previews of an Haml file simply show it as plain text. While t...
[ "html", "editor", "haml", "coda", "macrabbit-espresso" ]
2
1
2,102
3
0
2011-06-04T18:30:03.407000
2011-06-06T23:12:48.667000
6,238,622
6,239,135
find unique items in a set of arrays and remove non-uniques from arrays found
Givven an object with Key as an Array (of position) and Value as an Array as well: // Example Object 0,2: [6, 8, 9] 0,3: [1, 6, 8] 0,4: [6, 8] 0,5: [6, 8] 0,6: [4, 5, 8, 9] 0,7: [5, 8] 0,8: [4, 5, 7, 9] (it was created like this: x = {}; x[[0,2]] = [6, 8, 9]; x[[0,3]] = [1, 6, 8];... Now, I want to narrow down my objec...
The idea here it that i go through every number in every array, and check it against a Bucket (string) which holds all the numbers from all the arrays, joined. if the first index of the current x[key][i] in the bucket is the SAME as the last index, it means this number is unique and, thus it's holding array is reset to...
find unique items in a set of arrays and remove non-uniques from arrays found Givven an object with Key as an Array (of position) and Value as an Array as well: // Example Object 0,2: [6, 8, 9] 0,3: [1, 6, 8] 0,4: [6, 8] 0,5: [6, 8] 0,6: [4, 5, 8, 9] 0,7: [5, 8] 0,8: [4, 5, 7, 9] (it was created like this: x = {}; x[[0...
TITLE: find unique items in a set of arrays and remove non-uniques from arrays found QUESTION: Givven an object with Key as an Array (of position) and Value as an Array as well: // Example Object 0,2: [6, 8, 9] 0,3: [1, 6, 8] 0,4: [6, 8] 0,5: [6, 8] 0,6: [4, 5, 8, 9] 0,7: [5, 8] 0,8: [4, 5, 7, 9] (it was created like ...
[ "javascript" ]
0
0
358
5
0
2011-06-04T18:33:00.453000
2011-06-04T20:15:15.890000
6,238,626
6,238,702
Build an extension system for my android application
I'm trying to build an extension system for my application, basically to add different protocols in it (facebook and twitter connection for example) and be able to configure them from my main application. I want it to be pretty similar to how dolphin browser extensions work. But I haven't any idea how to start it. Do a...
There are different options to do that: create an interface for the service you want to build, the abstraction of the expected behavior of your twitter/facebook connectors. provide a way to lazyly instanciate the implementation of your choice for this service. It could be done through a factory design pattern, a bus de...
Build an extension system for my android application I'm trying to build an extension system for my application, basically to add different protocols in it (facebook and twitter connection for example) and be able to configure them from my main application. I want it to be pretty similar to how dolphin browser extensio...
TITLE: Build an extension system for my android application QUESTION: I'm trying to build an extension system for my application, basically to add different protocols in it (facebook and twitter connection for example) and be able to configure them from my main application. I want it to be pretty similar to how dolphi...
[ "android" ]
2
2
114
1
0
2011-06-04T18:33:40.927000
2011-06-04T18:49:05.997000
6,238,639
6,238,870
Using:JavascriptConverter in ASP.NET
I'm currently serializing objects like this: public static string ObjToJson(List TheObjects){ JavascriptSerializer TheSerializer = new JavascriptSerializer(); TheSerializer.RegisterConverters( new JavascriptConverter [] { new ObjectToJson() }); string JsonObj = TheSerializer.Serialize(TheObjects); return JsonObj; } An...
I think the most popular JSON library is json.net. It's fast and easy to use.
Using:JavascriptConverter in ASP.NET I'm currently serializing objects like this: public static string ObjToJson(List TheObjects){ JavascriptSerializer TheSerializer = new JavascriptSerializer(); TheSerializer.RegisterConverters( new JavascriptConverter [] { new ObjectToJson() }); string JsonObj = TheSerializer.Serial...
TITLE: Using:JavascriptConverter in ASP.NET QUESTION: I'm currently serializing objects like this: public static string ObjToJson(List TheObjects){ JavascriptSerializer TheSerializer = new JavascriptSerializer(); TheSerializer.RegisterConverters( new JavascriptConverter [] { new ObjectToJson() }); string JsonObj = Th...
[ "c#", "asp.net" ]
0
1
109
1
0
2011-06-04T18:36:43.917000
2011-06-04T19:19:19.223000
6,238,642
6,238,831
Show camera shutter programmatically?
In order to make my custom UIImagePickerSourceTypeCamera, I had to do this: pickerOne = [[UIImagePickerController alloc] init]; pickerOne.delegate = self; pickerOne.sourceType = UIImagePickerControllerSourceTypeCamera; pickerOne.showsCameraControls = NO; pickerOne.navigationBarHidden = YES; pickerOne.toolbarHidden = YE...
It is possible. The trick is to do the following: Enable the camera controls on initializing the picker (this will enable the shutter view). pickerOne.showsCameraControls = YES; Overlay the camera controls with your own view which has the cameraButton In your takePicture: method do the following: pickerOne.showsCameraC...
Show camera shutter programmatically? In order to make my custom UIImagePickerSourceTypeCamera, I had to do this: pickerOne = [[UIImagePickerController alloc] init]; pickerOne.delegate = self; pickerOne.sourceType = UIImagePickerControllerSourceTypeCamera; pickerOne.showsCameraControls = NO; pickerOne.navigationBarHidd...
TITLE: Show camera shutter programmatically? QUESTION: In order to make my custom UIImagePickerSourceTypeCamera, I had to do this: pickerOne = [[UIImagePickerController alloc] init]; pickerOne.delegate = self; pickerOne.sourceType = UIImagePickerControllerSourceTypeCamera; pickerOne.showsCameraControls = NO; pickerOne...
[ "objective-c", "cocoa-touch", "ios", "uiimagepickercontroller" ]
3
2
2,010
2
0
2011-06-04T18:37:18.637000
2011-06-04T19:11:15.137000
6,238,646
6,238,718
Javascript Non UTF-8 Character Searching for Google Chrome Extension
Edit: I am creating a Chrome Extension and the files must be UTF-8 encoded. I use JQuery to get contents from page, and check that if that contains specific strings that contains Ö, ı and İ. However, because the Chrome forces files must be encoded UTF-8; I cannot perform a search of "İ, ı, Ö". var p = txt.indexOf("İ");...
JavaScript string literals include a syntax for expressing special characters. For instance, 'Ö' and '\u00D6' are identical strings in JavaScript. To find the unicode literal for a specific character, you can do this: 'Ö'.charCodeAt(0).toString(16); // yields "d6"; the code is "\u00D6" Therefore, to search for a Ö in a...
Javascript Non UTF-8 Character Searching for Google Chrome Extension Edit: I am creating a Chrome Extension and the files must be UTF-8 encoded. I use JQuery to get contents from page, and check that if that contains specific strings that contains Ö, ı and İ. However, because the Chrome forces files must be encoded UTF...
TITLE: Javascript Non UTF-8 Character Searching for Google Chrome Extension QUESTION: Edit: I am creating a Chrome Extension and the files must be UTF-8 encoded. I use JQuery to get contents from page, and check that if that contains specific strings that contains Ö, ı and İ. However, because the Chrome forces files m...
[ "javascript", "utf-8", "google-chrome-extension", "turkish" ]
1
7
3,458
2
0
2011-06-04T18:38:09.617000
2011-06-04T18:52:03.467000
6,238,651
6,238,667
C++ Database Access With No Required Installation
I am looking for a database that can I run SQL statements on without having to have a database server installed. I.e. I need the ability to select/insert/update a database given only the database file and any external libraries. Here is my situation: I am using C++ to parse through a number of oddly-formatted binary fi...
You cannot go wrong with SQLite here. It is small enough to be embedded in many apps (see e.g. here for a list of famous apps ranging from Photoshop to Apple Mail + Safari, Dropbox, Firefox, Chrome, Skype and more), yet complete enough to cover most SQL aspects you may need. Great support too, and wide coverage in term...
C++ Database Access With No Required Installation I am looking for a database that can I run SQL statements on without having to have a database server installed. I.e. I need the ability to select/insert/update a database given only the database file and any external libraries. Here is my situation: I am using C++ to p...
TITLE: C++ Database Access With No Required Installation QUESTION: I am looking for a database that can I run SQL statements on without having to have a database server installed. I.e. I need the ability to select/insert/update a database given only the database file and any external libraries. Here is my situation: I...
[ "c#", "c++", "sql", "database" ]
4
5
1,283
2
0
2011-06-04T18:39:38.620000
2011-06-04T18:43:00.147000
6,238,654
6,238,691
CCArray initwithcapacity and resizing
I have a ccarray and I thought that I always had to know the initial size.... So I do this: CCArray initwithcapacity 4 However I accidentally added 5 items to the array and the program did not crash. Does CCArray automatically resize or am I going to run into memory issues later?
You need to give an initial capacity (as you gien 4) after that if you add more element in CCArray it expend at runtime. it's act same as NSMutableArray. Mutable arrays expand as needed; capacity number simply establishes the object’s initial capacity.
CCArray initwithcapacity and resizing I have a ccarray and I thought that I always had to know the initial size.... So I do this: CCArray initwithcapacity 4 However I accidentally added 5 items to the array and the program did not crash. Does CCArray automatically resize or am I going to run into memory issues later?
TITLE: CCArray initwithcapacity and resizing QUESTION: I have a ccarray and I thought that I always had to know the initial size.... So I do this: CCArray initwithcapacity 4 However I accidentally added 5 items to the array and the program did not crash. Does CCArray automatically resize or am I going to run into memo...
[ "iphone", "objective-c", "cocos2d-iphone" ]
0
1
511
2
0
2011-06-04T18:40:19.617000
2011-06-04T18:47:28.120000
6,238,661
6,239,347
Where to store events in a distributed system which uses event sourcing?
Given you have multiple systems, which are integrated by events, and all of them are using event sourcing. Where do you store the events? In my case I have three systems: A website, which is a shop A backend for the Website to manage customers, products etc. An accounting system Whenever a domain event happens in one o...
Each system stores its own events. Each system is its own CQRS system, or at least its own self-contained service, and therefore is responsible for its own data. Each system also publishes its event to a service bus. This service bus determines where it saves these events. Usually it is in a transactional queuing syste...
Where to store events in a distributed system which uses event sourcing? Given you have multiple systems, which are integrated by events, and all of them are using event sourcing. Where do you store the events? In my case I have three systems: A website, which is a shop A backend for the Website to manage customers, pr...
TITLE: Where to store events in a distributed system which uses event sourcing? QUESTION: Given you have multiple systems, which are integrated by events, and all of them are using event sourcing. Where do you store the events? In my case I have three systems: A website, which is a shop A backend for the Website to ma...
[ "messaging", "cqrs", "event-sourcing" ]
7
7
1,785
2
0
2011-06-04T18:42:11.047000
2011-06-04T20:54:37.653000
6,238,671
6,238,681
I can't catch php exceptions using try....catch
I'm having a problem with PHP Exceptions. Even if I try to execute this code: try { $some->knownMethodWithError(); } catch(Zend_Exception $exp){ echo 'Error!: '. $exp->getMessage(); } My apache/php served web page always display a 500 Error. I mean, echo 'Error!: '. $exp->getMessage(); never is executed. I've tested wi...
A 500 error isn't a PHP exception, it's happening above the code level. A 500 error means that there was an error while PHP was trying to parse your script (probably). Possibly your code has a syntax error.
I can't catch php exceptions using try....catch I'm having a problem with PHP Exceptions. Even if I try to execute this code: try { $some->knownMethodWithError(); } catch(Zend_Exception $exp){ echo 'Error!: '. $exp->getMessage(); } My apache/php served web page always display a 500 Error. I mean, echo 'Error!: '. $exp-...
TITLE: I can't catch php exceptions using try....catch QUESTION: I'm having a problem with PHP Exceptions. Even if I try to execute this code: try { $some->knownMethodWithError(); } catch(Zend_Exception $exp){ echo 'Error!: '. $exp->getMessage(); } My apache/php served web page always display a 500 Error. I mean, echo...
[ "zend-framework", "exception", "php" ]
2
3
4,412
2
0
2011-06-04T18:43:45.823000
2011-06-04T18:45:25.320000
6,238,676
6,238,690
How can I make a div *not* expand to fill it's parent?
I have a div wrapped around an image, like this: Blah blah blah. Now, I expect image-wrapper to take the size of the image, and no more. But it doesn't; it instead fills to the height of containing-div. (See actual page here: http://holyworlds.org/new_hw/wallpapers.php ) My CSS is:.image-wrapper{ float: left; box-shado...
Have you tried:.image-wrapper { display: inline; } Or:.image-wrapper { display: inline-block; } Or:.image-wrapper { float: left; }
How can I make a div *not* expand to fill it's parent? I have a div wrapped around an image, like this: Blah blah blah. Now, I expect image-wrapper to take the size of the image, and no more. But it doesn't; it instead fills to the height of containing-div. (See actual page here: http://holyworlds.org/new_hw/wallpapers...
TITLE: How can I make a div *not* expand to fill it's parent? QUESTION: I have a div wrapped around an image, like this: Blah blah blah. Now, I expect image-wrapper to take the size of the image, and no more. But it doesn't; it instead fills to the height of containing-div. (See actual page here: http://holyworlds.org...
[ "html", "css", "layout" ]
7
11
14,465
2
0
2011-06-04T18:44:17.587000
2011-06-04T18:47:22.577000
6,238,688
6,238,779
Creating a Dropdown That Refreshs the Page and Allow User to Edit Specific Parts of Database
I understand the title may be a little vague, but, hopefully, I can explain it here. We have a page where the user modifies certain fields of a database. The fields being modified change with the selection of a dropdown at the top of the page. Suppose we have this table by the name of restaurants: ---------------------...
JavaScript: - set the value of the drop down list in the onload event. PHP: - set the selected tag by saying something like and the HTML would be // build the options here if you are doing a database while loop // check to see if the option value == $ddlRestaurantPersistValue and then add // selected='selected' to the ...
Creating a Dropdown That Refreshs the Page and Allow User to Edit Specific Parts of Database I understand the title may be a little vague, but, hopefully, I can explain it here. We have a page where the user modifies certain fields of a database. The fields being modified change with the selection of a dropdown at the ...
TITLE: Creating a Dropdown That Refreshs the Page and Allow User to Edit Specific Parts of Database QUESTION: I understand the title may be a little vague, but, hopefully, I can explain it here. We have a page where the user modifies certain fields of a database. The fields being modified change with the selection of ...
[ "php", "html", "forms", "select" ]
1
1
175
4
0
2011-06-04T18:46:54.930000
2011-06-04T19:02:50.093000
6,238,693
6,238,800
Get File Name via Index
I want to get a file from the index... so say there was a folder, and I wanted to get the first file in that folder and put the name in a string. Is there a function for that?
The FindFirstFile API function returns what the file system considers to be the first file in the directory. If you want some later file, proceed to call FindNextFile the appropriate number of times. In any case, call FindClose afterward. For NTFS, directories store their file names in sorted order. It might not be the...
Get File Name via Index I want to get a file from the index... so say there was a folder, and I wanted to get the first file in that folder and put the name in a string. Is there a function for that?
TITLE: Get File Name via Index QUESTION: I want to get a file from the index... so say there was a folder, and I wanted to get the first file in that folder and put the name in a string. Is there a function for that? ANSWER: The FindFirstFile API function returns what the file system considers to be the first file in...
[ "c++", "windows", "winapi", "file" ]
0
2
332
1
0
2011-06-04T18:47:35.967000
2011-06-04T19:04:49.357000
6,238,694
6,238,721
Decoupling an ASP.NET MVC application from Entity Framework
If I have this project structure Foo.Data reference EntityFramework Foo.Business reference Foo.Data Foo.Web reference Foo.Business Isn't that supposed to allow me to prevent adding a reference to EntityFramework from Foo.Web? How can I call System.Data.Entity.Database.SetInitializer() from my global.asax.cs without add...
What you can do is create a InitializeDatabase() function in your Foo.Business project which in-turn calls System.Data.Entity.Database.SetInitializer(). You can then call InitializeDatabase() from your Foo.Web project which already has a reference to Foo.Business
Decoupling an ASP.NET MVC application from Entity Framework If I have this project structure Foo.Data reference EntityFramework Foo.Business reference Foo.Data Foo.Web reference Foo.Business Isn't that supposed to allow me to prevent adding a reference to EntityFramework from Foo.Web? How can I call System.Data.Entity....
TITLE: Decoupling an ASP.NET MVC application from Entity Framework QUESTION: If I have this project structure Foo.Data reference EntityFramework Foo.Business reference Foo.Data Foo.Web reference Foo.Business Isn't that supposed to allow me to prevent adding a reference to EntityFramework from Foo.Web? How can I call S...
[ "asp.net-mvc", "dependency-injection", "entity-framework-4.1", "separation-of-concerns" ]
4
2
915
3
0
2011-06-04T18:47:42.423000
2011-06-04T18:52:23.017000
6,238,710
6,238,726
Touch up outside location from UI Button
I am trying to write a method that receives the coordinates of a ending touch event when a user touches a button and then drags off off the button. Is the touch coordinate information available if the button is passed into the method as the sender? Any suggestions are welcome.
The touch coordinates information is not available form the sender. But your action's selector can take the form -(IBAction)dragOutside:(id)sender withEvent:(UIEvent*)event; and the event does contain the coordinates and other things.
Touch up outside location from UI Button I am trying to write a method that receives the coordinates of a ending touch event when a user touches a button and then drags off off the button. Is the touch coordinate information available if the button is passed into the method as the sender? Any suggestions are welcome.
TITLE: Touch up outside location from UI Button QUESTION: I am trying to write a method that receives the coordinates of a ending touch event when a user touches a button and then drags off off the button. Is the touch coordinate information available if the button is passed into the method as the sender? Any suggesti...
[ "iphone", "cocoa-touch" ]
0
1
1,122
2
0
2011-06-04T18:50:12.077000
2011-06-04T18:52:59.283000
6,238,715
6,238,748
How to Look at a Gem's Code
I have a Gem that I found at RubyForge and want to peek inside to see what code it contains. Is it possible to do this without installing the Gem on my system? Also, if I use RVM on Mac OS X, does that at all change how my gems get installed (assuming I have one gemset)?
Gems on RubyGems usually have a link to the source code (most often on GitHub ), in which case you can easily browse the code (I use this A LOT). The "homepage" link also tends to link to the repository. If all else fails, go to GitHub and search for the name of the gem (you may need to match up the authors to ensure i...
How to Look at a Gem's Code I have a Gem that I found at RubyForge and want to peek inside to see what code it contains. Is it possible to do this without installing the Gem on my system? Also, if I use RVM on Mac OS X, does that at all change how my gems get installed (assuming I have one gemset)?
TITLE: How to Look at a Gem's Code QUESTION: I have a Gem that I found at RubyForge and want to peek inside to see what code it contains. Is it possible to do this without installing the Gem on my system? Also, if I use RVM on Mac OS X, does that at all change how my gems get installed (assuming I have one gemset)? A...
[ "ruby", "rubygems", "installation" ]
3
3
1,150
3
0
2011-06-04T18:51:44.937000
2011-06-04T18:56:32.453000
6,238,719
6,238,738
Visual Studio - Shortcut to Navigate to Solution Explorer
Is there a keyboard shortcut in Visual Studio (aside from CTRL + TAB and selection) that would take me from inside a document directly into the solution explorer? I don't want to customize any shortcuts or change any default behavior.
CTRL + ALT + L should shift focus to the Solution Explorer. For visual studio 2012 use: CTRL + [ + S this selects your current document in the solution explorer.
Visual Studio - Shortcut to Navigate to Solution Explorer Is there a keyboard shortcut in Visual Studio (aside from CTRL + TAB and selection) that would take me from inside a document directly into the solution explorer? I don't want to customize any shortcuts or change any default behavior.
TITLE: Visual Studio - Shortcut to Navigate to Solution Explorer QUESTION: Is there a keyboard shortcut in Visual Studio (aside from CTRL + TAB and selection) that would take me from inside a document directly into the solution explorer? I don't want to customize any shortcuts or change any default behavior. ANSWER: ...
[ "visual-studio-2010", "keyboard-shortcuts" ]
168
270
97,297
13
0
2011-06-04T18:52:06.490000
2011-06-04T18:54:55.427000
6,238,725
6,238,793
File repository in ruby on rails
I would like to create a simple file repository in Ruby on Rails. Users have their accounts, and after one logs in they can upload a file or download files previously uploaded. The issue here is the security. Files should be safe and not available to anyone but the owners. Where, in which folder, should I store the fil...
rename the files, for one reason, because you have no way to know if today's file "test" is supposed to replace last week's "test" or not (perhaps the user had them in different directories) give each user their own directory, this prevents performance problems and makes it easy to migrate, archive, or delete a single ...
File repository in ruby on rails I would like to create a simple file repository in Ruby on Rails. Users have their accounts, and after one logs in they can upload a file or download files previously uploaded. The issue here is the security. Files should be safe and not available to anyone but the owners. Where, in whi...
TITLE: File repository in ruby on rails QUESTION: I would like to create a simple file repository in Ruby on Rails. Users have their accounts, and after one logs in they can upload a file or download files previously uploaded. The issue here is the security. Files should be safe and not available to anyone but the own...
[ "ruby-on-rails", "ruby", "file", "repository" ]
2
5
648
4
0
2011-06-04T18:52:54.313000
2011-06-04T19:04:12.483000
6,238,731
6,238,890
IE and JavaScript (jQuery) problems
I have a page that has multiple tabs that toggle the display of hidden elements. It uses the following js: $('document').ready(function() { // Profile Tabs $('ul.profile_tabs li').click(function(){ var type = $(this).attr('type'); $('.content-profile-title').css('display', 'none'); $('.content-profile-display').css('...
Don't use attributes to hold data. But if you have to, try something like title which is available to most elements.
IE and JavaScript (jQuery) problems I have a page that has multiple tabs that toggle the display of hidden elements. It uses the following js: $('document').ready(function() { // Profile Tabs $('ul.profile_tabs li').click(function(){ var type = $(this).attr('type'); $('.content-profile-title').css('display', 'none');...
TITLE: IE and JavaScript (jQuery) problems QUESTION: I have a page that has multiple tabs that toggle the display of hidden elements. It uses the following js: $('document').ready(function() { // Profile Tabs $('ul.profile_tabs li').click(function(){ var type = $(this).attr('type'); $('.content-profile-title').css('...
[ "javascript", "jquery", "internet-explorer" ]
0
1
74
1
0
2011-06-04T18:54:07.003000
2011-06-04T19:23:47.070000
6,238,734
6,247,480
JRuby calls the wrong method
I got a strange problem with a call to a Java method from JRuby. In my Java class these methods are defined twice, and it appears JRuby calls the wrong one. So I tried to use java_method, but I always got a: TypeError: cannot convert instance of class org.jruby.RubyModule to class java.lang.Class Here's my Java code: p...
You can fix that cannot convert instance of class org.jruby.RubyModule to class java.lang.Class using java.lang.Class.for_name In your case, it is add_renderer = renderer.java_method:add_renderer, [java.lang.Class.for_name("dragon.render.IElementRenderer")] This is because java interfaces become Ruby Modules by default...
JRuby calls the wrong method I got a strange problem with a call to a Java method from JRuby. In my Java class these methods are defined twice, and it appears JRuby calls the wrong one. So I tried to use java_method, but I always got a: TypeError: cannot convert instance of class org.jruby.RubyModule to class java.lang...
TITLE: JRuby calls the wrong method QUESTION: I got a strange problem with a call to a Java method from JRuby. In my Java class these methods are defined twice, and it appears JRuby calls the wrong one. So I tried to use java_method, but I always got a: TypeError: cannot convert instance of class org.jruby.RubyModule ...
[ "java", "jruby" ]
3
4
1,109
2
0
2011-06-04T18:54:21.533000
2011-06-06T03:16:35.383000
6,238,741
6,238,792
JavaScript slider code
I'm making js-slider of div blocks. I have an arrows to the both sides. I want to scroll horizontally my slider when mouse is over. Before this I did everything using this code: jQuery('.control').bind('click', function(){ jQuery('#slideInner').animate({ 'marginLeft': SlideWidth * SlideNumber }); }); But what to do, if...
You should have a setInterval(...) to be delay-looping while element is hovered var interval = null; // I use global var for this example - globals are discouraged in general jQuery('.control').hover(function(){ interval = setInterval(function() { // start looping when mouse enters jQuery('#slideInner').animate({ 'marg...
JavaScript slider code I'm making js-slider of div blocks. I have an arrows to the both sides. I want to scroll horizontally my slider when mouse is over. Before this I did everything using this code: jQuery('.control').bind('click', function(){ jQuery('#slideInner').animate({ 'marginLeft': SlideWidth * SlideNumber });...
TITLE: JavaScript slider code QUESTION: I'm making js-slider of div blocks. I have an arrows to the both sides. I want to scroll horizontally my slider when mouse is over. Before this I did everything using this code: jQuery('.control').bind('click', function(){ jQuery('#slideInner').animate({ 'marginLeft': SlideWidth...
[ "javascript", "jquery", "slider" ]
0
2
793
1
0
2011-06-04T18:55:37.020000
2011-06-04T19:03:53.573000
6,238,752
6,238,822
MFMailComposer is not working in iPhone 3GS
I have this piece of code for MFMailComposer working fine in the simulator and iPhone 4, but it crashes on 3GS. What is the reason and what is the way to resolve it? I checked it with breakpoints. mailPicker is not allocated with memory. MFMailComposeViewController *mailPicker = [[MFMailComposeViewController alloc] ini...
If at least one email account is enabled on the device, the following call should return YES: [MFMailComposeViewController canSendMail] Conversely, if all accounts are disabled/removed, it will return NO.
MFMailComposer is not working in iPhone 3GS I have this piece of code for MFMailComposer working fine in the simulator and iPhone 4, but it crashes on 3GS. What is the reason and what is the way to resolve it? I checked it with breakpoints. mailPicker is not allocated with memory. MFMailComposeViewController *mailPicke...
TITLE: MFMailComposer is not working in iPhone 3GS QUESTION: I have this piece of code for MFMailComposer working fine in the simulator and iPhone 4, but it crashes on 3GS. What is the reason and what is the way to resolve it? I checked it with breakpoints. mailPicker is not allocated with memory. MFMailComposeViewCon...
[ "iphone", "mfmailcomposeviewcontroller" ]
0
3
536
1
0
2011-06-04T18:57:03.323000
2011-06-04T19:10:15.330000
6,238,753
6,241,719
Can I create a shared folder on remote machine?
I am trying to automate the Account Creation process in Active Directory and I want to create the user home directory on a server and then I want it to become a shared folder with some user permissions. I can create folder on that machine (remote machine) but I cannot convert it to a shared folder. Is there a way I can...
Which language are you using to script? You can do exactly what you are doing localy, on a remote computer using psExec from SysInternals. You'll find at th end of this post how to do it in ldap mixed in with WMI.
Can I create a shared folder on remote machine? I am trying to automate the Account Creation process in Active Directory and I want to create the user home directory on a server and then I want it to become a shared folder with some user permissions. I can create folder on that machine (remote machine) but I cannot con...
TITLE: Can I create a shared folder on remote machine? QUESTION: I am trying to automate the Account Creation process in Active Directory and I want to create the user home directory on a server and then I want it to become a shared folder with some user permissions. I can create folder on that machine (remote machine...
[ "active-directory" ]
0
0
1,388
1
0
2011-06-04T18:57:14.313000
2011-06-05T08:16:13.130000
6,238,766
6,239,252
System.IntNN, System.UIntNN version requirements
What's the first version of Delphi that has Int8, Int16, Int32, UInt8, UInt16, UInt32 declared in the System unit. Which VERnnn conditional symbol or RTLVersion value do I need to use for detection?
All I know for sure is that these type aliases are declared in Delphi 2009, and I wouldn't be surprised if this is the version in which they first appeared.
System.IntNN, System.UIntNN version requirements What's the first version of Delphi that has Int8, Int16, Int32, UInt8, UInt16, UInt32 declared in the System unit. Which VERnnn conditional symbol or RTLVersion value do I need to use for detection?
TITLE: System.IntNN, System.UIntNN version requirements QUESTION: What's the first version of Delphi that has Int8, Int16, Int32, UInt8, UInt16, UInt32 declared in the System unit. Which VERnnn conditional symbol or RTLVersion value do I need to use for detection? ANSWER: All I know for sure is that these type aliase...
[ "delphi", "compatibility" ]
2
2
161
2
0
2011-06-04T18:59:52.697000
2011-06-04T20:38:04.207000
6,238,769
6,238,894
c# Regex: find placeholders as substring
i have following string. "hello [#NAME#]. nice to meet you. I heard about you via [#SOURCE#]." in above text i have two place holders. NAME and SOURCE i want to extract these sub string using Reg Ex. what would be the reg ex pattern to find list of these place holders. i tried string pattern = @"\[#(\w+)#\]"; result he...
Your regex is working correctly. That's, how Regex.Split() should behave (see the doc ). If what you said is really what you want, you can use something like: var matches = from Match match in Regex.Matches(text, pattern) select match.Groups[1].Value; If, on the other hand, you wanted to replace the placeholders using ...
c# Regex: find placeholders as substring i have following string. "hello [#NAME#]. nice to meet you. I heard about you via [#SOURCE#]." in above text i have two place holders. NAME and SOURCE i want to extract these sub string using Reg Ex. what would be the reg ex pattern to find list of these place holders. i tried s...
TITLE: c# Regex: find placeholders as substring QUESTION: i have following string. "hello [#NAME#]. nice to meet you. I heard about you via [#SOURCE#]." in above text i have two place holders. NAME and SOURCE i want to extract these sub string using Reg Ex. what would be the reg ex pattern to find list of these place ...
[ "c#", "regex" ]
10
8
7,763
3
0
2011-06-04T19:00:11.373000
2011-06-04T19:25:34.887000
6,238,770
6,238,780
Gcc compiler C string assignment issue
I wrote this code because I'm having a similar problem in a larger program I'm writing. For all I know the problem is the same so I made this small example. #include typedef struct { int x; char * val; }my_struct; int main() { my_struct me = {4, " "}; puts("Initialization works."); me.val[0] = 'a'; puts("Assignment wo...
Your code. ANSI permits string constants to be read-only, and this is encouraged because it means they can be shared system-wide across all running instances of a program; gcc does so unless you specify -fwritable-strings, while tcc makes them writable (probably because it's easier).
Gcc compiler C string assignment issue I wrote this code because I'm having a similar problem in a larger program I'm writing. For all I know the problem is the same so I made this small example. #include typedef struct { int x; char * val; }my_struct; int main() { my_struct me = {4, " "}; puts("Initialization works."...
TITLE: Gcc compiler C string assignment issue QUESTION: I wrote this code because I'm having a similar problem in a larger program I'm writing. For all I know the problem is the same so I made this small example. #include typedef struct { int x; char * val; }my_struct; int main() { my_struct me = {4, " "}; puts("Init...
[ "c", "string", "gcc", "variable-assignment", "tcc" ]
0
8
1,324
3
0
2011-06-04T19:00:15.447000
2011-06-04T19:02:54.380000
6,238,771
6,238,891
Complex time-series statistical aggregation involving polymorphic associations
Ok. Bear with me, as I need to provide a lot of contextual detail before I can solicit a reasonable answer to my question. I have a site that allows you to make daily stock picks. The way it works is that you're prompted to make picks between companies that are facing-off for the day. For example, GE vs. IBM. You can m...
I don't see the need for table pick_records. You can do a query like this for any number of days: SELECT user_id,sum(amount_spent),sum(IF(result = 'WON',1,0)) as WON_count,sum(IF(result = 'LOST',1,0)) as LOST_count,pick /*matchup_id*/,sum(pc.price) as price,sum(IF(result = 'WON'),amount_won,0)) as amount_won,sum(IF(res...
Complex time-series statistical aggregation involving polymorphic associations Ok. Bear with me, as I need to provide a lot of contextual detail before I can solicit a reasonable answer to my question. I have a site that allows you to make daily stock picks. The way it works is that you're prompted to make picks betwee...
TITLE: Complex time-series statistical aggregation involving polymorphic associations QUESTION: Ok. Bear with me, as I need to provide a lot of contextual detail before I can solicit a reasonable answer to my question. I have a site that allows you to make daily stock picks. The way it works is that you're prompted to...
[ "mysql", "sql", "ruby-on-rails", "polymorphic-associations", "aggregation" ]
11
3
617
3
0
2011-06-04T19:00:27.080000
2011-06-04T19:24:23.970000
6,238,785
6,245,964
NewStringUTF() and freeing memory
Should I free the allocated string after passing it to NewStringUTF()? I have some code similar to: char* test; jstring j_test; test = some_function(); // <- malloc()s the memory j_test = (*env)->NewStringUTF(env, test); free(test); // <- should this be here? When I free the string after passing it to NewStringUTF(),...
The storage for the const char* argument to NewStringUTF() is entirely your responsibility: if you allocated test with malloc(), then you need to free() it. So, the snippet you posted is correct. You are corrupting the heap somewhere else. I see conflicting opinions. Some say I should free it myself, some say the VM fr...
NewStringUTF() and freeing memory Should I free the allocated string after passing it to NewStringUTF()? I have some code similar to: char* test; jstring j_test; test = some_function(); // <- malloc()s the memory j_test = (*env)->NewStringUTF(env, test); free(test); // <- should this be here? When I free the string a...
TITLE: NewStringUTF() and freeing memory QUESTION: Should I free the allocated string after passing it to NewStringUTF()? I have some code similar to: char* test; jstring j_test; test = some_function(); // <- malloc()s the memory j_test = (*env)->NewStringUTF(env, test); free(test); // <- should this be here? When I...
[ "java", "java-native-interface" ]
50
89
58,258
2
0
2011-06-04T19:03:16.400000
2011-06-05T21:24:39.747000
6,238,796
6,239,062
Count number of occurrences in SQL
I have a table with the following structure: (table_name, column_name) and for each row in this table I need to query the column_name in the table_name and do a COUNT(column_name) GROUP BY column_name of the values in there. Currently I do SELECT * FROM this table /*and then*/ foreach row: do another query with: SELECT...
If you are working in MySql, you can't directly use parametrized column names. There is an indirect way of doing this using stored procedures and prepared statements. some sloppy first-draft code... notice the difference between backticks ` and quotes ' CREATE PROCEDURE CountTables() BEGIN DECLARE done TINYINT DEFAULT ...
Count number of occurrences in SQL I have a table with the following structure: (table_name, column_name) and for each row in this table I need to query the column_name in the table_name and do a COUNT(column_name) GROUP BY column_name of the values in there. Currently I do SELECT * FROM this table /*and then*/ foreach...
TITLE: Count number of occurrences in SQL QUESTION: I have a table with the following structure: (table_name, column_name) and for each row in this table I need to query the column_name in the table_name and do a COUNT(column_name) GROUP BY column_name of the values in there. Currently I do SELECT * FROM this table /*...
[ "mysql", "sql", "join" ]
4
2
843
4
0
2011-06-04T19:04:16.163000
2011-06-04T20:00:34.513000
6,238,799
6,239,078
Manipulating JPEG images pixel-per-pixel using Mini Jpeg Decoder
I want to manipulate JPEG images with C++ using the decoder Mini Jpeg Decoder. The problem is: I want to read pixel per pixel, but the decoder only returns an imageData-array, similar as libjpeg does. I can't make a method like this: char getPixel(char x, char y, unsigned char* imageData) { //...??? } The return (the c...
As far as I can tell, the Decoder class delivers a byte array of color values with the GetImage() method. So you could write a function that looks like this: char getLuminance(Decoder* dec, int x, int y) { if(x < 0 || y < 0 || x >= dec->GetWidth() || y >= dec->GetHeight()) { throw "out of bounds"; } return dec->GetIma...
Manipulating JPEG images pixel-per-pixel using Mini Jpeg Decoder I want to manipulate JPEG images with C++ using the decoder Mini Jpeg Decoder. The problem is: I want to read pixel per pixel, but the decoder only returns an imageData-array, similar as libjpeg does. I can't make a method like this: char getPixel(char x,...
TITLE: Manipulating JPEG images pixel-per-pixel using Mini Jpeg Decoder QUESTION: I want to manipulate JPEG images with C++ using the decoder Mini Jpeg Decoder. The problem is: I want to read pixel per pixel, but the decoder only returns an imageData-array, similar as libjpeg does. I can't make a method like this: cha...
[ "c++", "image-manipulation", "libjpeg", "getpixel" ]
1
0
1,254
1
0
2011-06-04T19:04:44.447000
2011-06-04T20:03:19.643000
6,238,805
6,239,049
Aligning graphic based bullet points with css
I have made a list of bullet points with icons, but i cant get the text to align nicely. HTML: List List List List List List List List List List List CSS: ul li { font-weight: bold; font-size: 110%; margin: 0px 0 15px 45px; padding-top:0px; border: 1px solid #fff; line-height: 0; }.moutlook { list-style-image: url(../i...
Use background-image instead of list-style-image. First, you'll have to add these declarations for cross-browser compatibility. ul { list-style-type: none; padding: 0px; margin: 0px; } Then replace your.moutlook declarations with these:.moutlook { background-image: url(../images/icon.png); background-repeat: no-repeat;...
Aligning graphic based bullet points with css I have made a list of bullet points with icons, but i cant get the text to align nicely. HTML: List List List List List List List List List List List CSS: ul li { font-weight: bold; font-size: 110%; margin: 0px 0 15px 45px; padding-top:0px; border: 1px solid #fff; line-heig...
TITLE: Aligning graphic based bullet points with css QUESTION: I have made a list of bullet points with icons, but i cant get the text to align nicely. HTML: List List List List List List List List List List List CSS: ul li { font-weight: bold; font-size: 110%; margin: 0px 0 15px 45px; padding-top:0px; border: 1px sol...
[ "css" ]
1
6
4,947
2
0
2011-06-04T19:05:28.720000
2011-06-04T19:56:11.297000
6,238,811
6,238,889
Creating a window that can only be dragged within the parent window
I have a WIN32/C++ app and I want to create child windows in it that cannot be dragged out of the parent window. I want these windows to be owner-drawn, if it matters anyway. Should be simple enough; I'm looking for some basic guidance and tips regarding the subject.
It seems that you want to make an MDI app. This is much easier using a higher level framework such as MFC, WinForms, VCL etc., but can, of course, be done with plain Win32. The MSDN documentation can be found here: Multiple Document Interface.
Creating a window that can only be dragged within the parent window I have a WIN32/C++ app and I want to create child windows in it that cannot be dragged out of the parent window. I want these windows to be owner-drawn, if it matters anyway. Should be simple enough; I'm looking for some basic guidance and tips regardi...
TITLE: Creating a window that can only be dragged within the parent window QUESTION: I have a WIN32/C++ app and I want to create child windows in it that cannot be dragged out of the parent window. I want these windows to be owner-drawn, if it matters anyway. Should be simple enough; I'm looking for some basic guidanc...
[ "c++", "c", "windows", "winapi" ]
2
2
122
2
0
2011-06-04T19:06:02.697000
2011-06-04T19:23:04.697000
6,238,812
6,238,844
json result is being returned wrapped in double quotes
I am trying to return a json string via jQuery of an object using the following function. The problem I do not seem to be able to overcome is my json result comes out the other end wrapped in double quotes. I have seen in this post that I should; have your method return an actual object and let the JSON serialization o...
Not clear whether you're having problem with the code you posted or with the javascript that handles it. So you're getting a result, it's just wrapped in double quotes? If you put a breakpoint at the beginning of the javascript callback function in Visual Studio, you should be able to see what is being returned. Just c...
json result is being returned wrapped in double quotes I am trying to return a json string via jQuery of an object using the following function. The problem I do not seem to be able to overcome is my json result comes out the other end wrapped in double quotes. I have seen in this post that I should; have your method r...
TITLE: json result is being returned wrapped in double quotes QUESTION: I am trying to return a json string via jQuery of an object using the following function. The problem I do not seem to be able to overcome is my json result comes out the other end wrapped in double quotes. I have seen in this post that I should; ...
[ "asp.net", "vb.net", "json" ]
1
2
2,504
3
0
2011-06-04T19:06:09.630000
2011-06-04T19:13:37.087000
6,238,819
6,242,259
Bilingual WordPress Site
I am trying to develop a bilingual site based on WordPress (bilingual sites in Quebec are a necessary reality). The problem is I find automated translators (i.e. Google Translate) do not get the context right. I noticed during a WordPress install (with Fantastico) I can select the folder where WordPress would live. Wou...
I'd definitely recommend, WPML plugin for handling multilingual sites. One admin area, every bit of content can have multiple hand crafted translations. Including pages, posts, menus etc. Plugins also get translated if they contain the relevant translation files. Also supports sub domains, so you could do french.yourdo...
Bilingual WordPress Site I am trying to develop a bilingual site based on WordPress (bilingual sites in Quebec are a necessary reality). The problem is I find automated translators (i.e. Google Translate) do not get the context right. I noticed during a WordPress install (with Fantastico) I can select the folder where ...
TITLE: Bilingual WordPress Site QUESTION: I am trying to develop a bilingual site based on WordPress (bilingual sites in Quebec are a necessary reality). The problem is I find automated translators (i.e. Google Translate) do not get the context right. I noticed during a WordPress install (with Fantastico) I can select...
[ "wordpress", "multilingual" ]
1
1
476
2
0
2011-06-04T19:07:30.360000
2011-06-05T10:11:41.940000
6,238,827
6,239,238
How Do I model a Shipment From One City (source) To Another (destination) is Active Record
I working in Rails 3 Activerecord. I have two models City and Shipment and I'm trying to model a shipment leaving from one city (ship_from) and shipping to another (ship_to). This is what I have: class Shipment < ActiveRecord::Base belongs_to:ship_from,:class_name => "City",:foreign_key => "city_id" belongs_to:ship_to,...
You're modeling two one-to-many relations. You're saying as Shipment has one from city and one to city. The one side is the part that's saved in your table. So you're saving a from_city_id and a to_city_id in your shipments table. Both these columns contain the id of a City. You model this one city relation by adding t...
How Do I model a Shipment From One City (source) To Another (destination) is Active Record I working in Rails 3 Activerecord. I have two models City and Shipment and I'm trying to model a shipment leaving from one city (ship_from) and shipping to another (ship_to). This is what I have: class Shipment < ActiveRecord::Ba...
TITLE: How Do I model a Shipment From One City (source) To Another (destination) is Active Record QUESTION: I working in Rails 3 Activerecord. I have two models City and Shipment and I'm trying to model a shipment leaving from one city (ship_from) and shipping to another (ship_to). This is what I have: class Shipment ...
[ "ruby-on-rails", "ruby-on-rails-3", "activerecord", "associations" ]
0
1
145
2
0
2011-06-04T19:11:00.633000
2011-06-04T20:34:42.727000
6,238,830
6,238,866
sort a json file with 2 entries
I have a json file like var data = { "list":[ { "g": "zas", "e": "wef" }, { "g": "abc", "e": "ew" }, { "g": "wee", "e": "asd" },..... How do I sort the entries w.r.t "g" so that I get abc then wee and then zas.... I want the sort changes permanently in the json file
In JavaScript, you can use a custom comparator function to sort an array like so: data.list.sort(function (a, b) { return a.g > b.g? 1: a.g < b.g? -1: 0 }); Array.sort @ MDC
sort a json file with 2 entries I have a json file like var data = { "list":[ { "g": "zas", "e": "wef" }, { "g": "abc", "e": "ew" }, { "g": "wee", "e": "asd" },..... How do I sort the entries w.r.t "g" so that I get abc then wee and then zas.... I want the sort changes permanently in the json file
TITLE: sort a json file with 2 entries QUESTION: I have a json file like var data = { "list":[ { "g": "zas", "e": "wef" }, { "g": "abc", "e": "ew" }, { "g": "wee", "e": "asd" },..... How do I sort the entries w.r.t "g" so that I get abc then wee and then zas.... I want the sort changes permanently in the json file A...
[ "json", "sorting" ]
0
1
406
1
0
2011-06-04T19:11:09.483000
2011-06-04T19:18:32.283000
6,238,834
6,238,934
How to configure WordPress-like permalinks?
I want to be able to have post permalinks appear in the root of the site. So, for example, a post with a permalink "hello-world" should appear as "mysite.com/hello-world", instead of "mysite.com/posts_controller/hello-world." How would I go about doing something like this?
I believe that you already have a "slug" field in your posts model. If your post controller has that into account, you just need to add the correct route for instance: match '/:slug' => "Posts#show" Otherwise, if don't have the slug in your model, you can use the Stringex plugin. It's an easy way to automatic create sl...
How to configure WordPress-like permalinks? I want to be able to have post permalinks appear in the root of the site. So, for example, a post with a permalink "hello-world" should appear as "mysite.com/hello-world", instead of "mysite.com/posts_controller/hello-world." How would I go about doing something like this?
TITLE: How to configure WordPress-like permalinks? QUESTION: I want to be able to have post permalinks appear in the root of the site. So, for example, a post with a permalink "hello-world" should appear as "mysite.com/hello-world", instead of "mysite.com/posts_controller/hello-world." How would I go about doing somet...
[ "ruby-on-rails", "ruby", "wordpress", "url" ]
1
3
252
2
0
2011-06-04T19:11:38.220000
2011-06-04T19:35:06.797000
6,238,841
6,238,905
How can I separate the sections in an INI file?
When saving to an INI file, especially when more than one section is defined, the data is saved all together with no lines between the sections. For external editing purposes it would be handy to separate each section with a line break, to make it easier to view and edit the INI file. For Example: Standard Ini [GENERAL...
Load the file and insert empty lines before each section name. Here's a function for it: procedure InsertSectionLineBreaks(const IniFile: TFileName); var f: TStrings; i: Integer; begin f:= TStringList.Create; try f.LoadFromFile(IniFile); for i:= Pred(f.Count) downto 1 do if (f[i] <> '') and (f[i][1] = '[') then f.Inser...
How can I separate the sections in an INI file? When saving to an INI file, especially when more than one section is defined, the data is saved all together with no lines between the sections. For external editing purposes it would be handy to separate each section with a line break, to make it easier to view and edit ...
TITLE: How can I separate the sections in an INI file? QUESTION: When saving to an INI file, especially when more than one section is defined, the data is saved all together with no lines between the sections. For external editing purposes it would be handy to separate each section with a line break, to make it easier...
[ "delphi", "ini" ]
10
9
3,092
4
0
2011-06-04T19:12:27.477000
2011-06-04T19:28:29.173000
6,238,846
6,238,868
PHP how to display rows from two tables
I have two tables namely 'categories' & 'products' as follows: categories id | name products id | cat_id | name cat_id in products references the categories table. Now, I want to display the list of all products on a page, which will have to also display the name of the category the product belongs to(not the cat_id)....
You should use SQL join, which is by far the best and easiest way to select data from two tables. SELECT p.id AS id, c.name AS category, p.name AS name FROM products AS p LEFT JOIN categories AS c ON p.cat_id = c.id You can also use the statement by Trevor, but that's a different type of join. Both will work in this ca...
PHP how to display rows from two tables I have two tables namely 'categories' & 'products' as follows: categories id | name products id | cat_id | name cat_id in products references the categories table. Now, I want to display the list of all products on a page, which will have to also display the name of the category...
TITLE: PHP how to display rows from two tables QUESTION: I have two tables namely 'categories' & 'products' as follows: categories id | name products id | cat_id | name cat_id in products references the categories table. Now, I want to display the list of all products on a page, which will have to also display the na...
[ "php", "mysql" ]
0
4
2,014
2
0
2011-06-04T19:13:50.333000
2011-06-04T19:19:07.553000
6,238,857
6,238,913
Object array: reference to existing objects or new instances
I have the following struct (or class?) in JavaScript: function ImageStruct() { this.id = -1; this.isCover = true; this.isPaired = false; this.row = -1; this.column = -1; } I add this class to a bidimensional array. var imgStruct = new ImageStruct(); imgStruct.id = id; imgStruct.row = row; imgStruct.column = column; $...
If you modify imgStrc it by changing its properties (e.g. by doing imgStrc.id = 42 ), that change will affect the object in $.myNameSpace.matrixPos[row][column] (as it is in fact the same object). Only if you modify imgStrc by reassigning it, it won't. There is no way to 'fix' this, other than setting $.myNameSpace.mat...
Object array: reference to existing objects or new instances I have the following struct (or class?) in JavaScript: function ImageStruct() { this.id = -1; this.isCover = true; this.isPaired = false; this.row = -1; this.column = -1; } I add this class to a bidimensional array. var imgStruct = new ImageStruct(); imgStruc...
TITLE: Object array: reference to existing objects or new instances QUESTION: I have the following struct (or class?) in JavaScript: function ImageStruct() { this.id = -1; this.isCover = true; this.isPaired = false; this.row = -1; this.column = -1; } I add this class to a bidimensional array. var imgStruct = new Image...
[ "javascript", "pointers", "object" ]
2
2
290
4
0
2011-06-04T19:15:54.793000
2011-06-04T19:29:57.553000
6,238,873
6,242,734
Eclipse and Xdebug does not parse additional ini files in /etc/php5/conf.d
I have setup Eclipse 3.6.2 on Ubuntu 11.4 for AMD64 and Xdebug. Eclipse was installed with zip download from eclipse.org. PHP and Xdebug were setup with apt-get. When I run the PHP script in the shell they will use the /etc/php5/php.ini file and parse additional ini files in /etc/php5/conf.d/. When I run in Eclipse (ru...
It is an intentional bug. PDT executes php with "-n" option always. It makes additional ini files unavailable. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=339547 also https://bugs.eclipse.org/bugs/show_bug.cgi?id=347618 BTW, you'll be able to add a shell script which trims "-n" option as PHP Executable.(Preferenc...
Eclipse and Xdebug does not parse additional ini files in /etc/php5/conf.d I have setup Eclipse 3.6.2 on Ubuntu 11.4 for AMD64 and Xdebug. Eclipse was installed with zip download from eclipse.org. PHP and Xdebug were setup with apt-get. When I run the PHP script in the shell they will use the /etc/php5/php.ini file and...
TITLE: Eclipse and Xdebug does not parse additional ini files in /etc/php5/conf.d QUESTION: I have setup Eclipse 3.6.2 on Ubuntu 11.4 for AMD64 and Xdebug. Eclipse was installed with zip download from eclipse.org. PHP and Xdebug were setup with apt-get. When I run the PHP script in the shell they will use the /etc/php...
[ "php", "eclipse", "ubuntu", "xdebug", "eclipse-pdt" ]
4
5
886
2
0
2011-06-04T19:19:58.660000
2011-06-05T11:53:30.143000
6,238,878
6,238,942
Testing server with JUnit
I would like to test my REST server with JUnit. Each test sends an HTTP request to the server and checks the response against the list of the elements expected to appear in the response. So, the testing procedure looks as follows: for each request in test requests send request and receive response assert the response i...
I would use the @BeforeClass method in your JUnit class to grab the latest version of your server and start it up (choosing an appropriate port and so on). Similarly @AfterClass could be used to programatically shut the server down. Doing this automatically is important as otherwise you'll have to remember to have the ...
Testing server with JUnit I would like to test my REST server with JUnit. Each test sends an HTTP request to the server and checks the response against the list of the elements expected to appear in the response. So, the testing procedure looks as follows: for each request in test requests send request and receive resp...
TITLE: Testing server with JUnit QUESTION: I would like to test my REST server with JUnit. Each test sends an HTTP request to the server and checks the response against the list of the elements expected to appear in the response. So, the testing procedure looks as follows: for each request in test requests send reques...
[ "java", "unit-testing", "junit" ]
5
6
3,468
1
0
2011-06-04T19:21:24.293000
2011-06-04T19:37:21.743000
6,238,879
6,238,941
What is the recommended way to keep a list of contacts accessible only to my app?
I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts. But my list of contacts must not be accessible from outside my application (and will be a password protected application). I guess I can use a SQLite...
Quoting the first sentence of the Content Providers page of the dev guide: Content providers store and retrieve data and make it accessible to all applications. The providers are actually built with accessibility in mind, which is exactly the opposite of what you want. Databases, on the other hand, are accessible exclu...
What is the recommended way to keep a list of contacts accessible only to my app? I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts. But my list of contacts must not be accessible from outside my appl...
TITLE: What is the recommended way to keep a list of contacts accessible only to my app? QUESTION: I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts. But my list of contacts must not be accessible fr...
[ "android", "contactscontract", "android-contacts" ]
0
0
100
1
0
2011-06-04T19:21:28.083000
2011-06-04T19:37:06.863000
6,238,880
6,238,901
creating hyperlink dynamically
i am trying to create a hyperlink from code-behind, but it is not creating it where i want it to be. if i look at my souce code is creating somewhere else and from.aspx page it seems like everything is in place where it needs to be..aspx.codebehind HyperLink links = new HyperLink(); links.Text = " " + CheckMe.ToString(...
I dont think you should put those tags in the.text and.navigateurl properties. just put the link and the text in them. Put the tags around the placeholder.
creating hyperlink dynamically i am trying to create a hyperlink from code-behind, but it is not creating it where i want it to be. if i look at my souce code is creating somewhere else and from.aspx page it seems like everything is in place where it needs to be..aspx.codebehind HyperLink links = new HyperLink(); links...
TITLE: creating hyperlink dynamically QUESTION: i am trying to create a hyperlink from code-behind, but it is not creating it where i want it to be. if i look at my souce code is creating somewhere else and from.aspx page it seems like everything is in place where it needs to be..aspx.codebehind HyperLink links = new ...
[ "asp.net" ]
0
1
2,227
3
0
2011-06-04T19:21:32.940000
2011-06-04T19:27:07.727000
6,238,881
6,238,923
How to disable all click events of a layout?
I have a layout that contains many views. Is there an easy way to disable all its views click events?
I would create a ViewGroup with all the views that you want to enable/disable at the same time and call setClickable(true/false) to enable/disable clicking.
How to disable all click events of a layout? I have a layout that contains many views. Is there an easy way to disable all its views click events?
TITLE: How to disable all click events of a layout? QUESTION: I have a layout that contains many views. Is there an easy way to disable all its views click events? ANSWER: I would create a ViewGroup with all the views that you want to enable/disable at the same time and call setClickable(true/false) to enable/disable...
[ "android", "android-layout" ]
34
24
87,804
10
0
2011-06-04T19:21:47.507000
2011-06-04T19:32:15.713000
6,238,902
6,238,963
Can JVM created in Cocoa project make call backs to the Cocoa project?
I used JNI to create JVM in my Cocoa project (that has some UI components) and were able to make calls to JVM (another Java app) to start some jobs. Now I want the JVM to be able to call back to tell my Cocoa app the status of a job executed. Is this doable? Is there any samples that I can use as reference?
Given the current Java UI on the Mac is implemented with Cocoa, of course! Check out the Java Native Foundation framework which provides some simple Java-Cocoa bridge support (note that all the documentation links are currently broken in MobileSafari; use Opera Mini or a desktop browser). To call from Java to Cocoa you...
Can JVM created in Cocoa project make call backs to the Cocoa project? I used JNI to create JVM in my Cocoa project (that has some UI components) and were able to make calls to JVM (another Java app) to start some jobs. Now I want the JVM to be able to call back to tell my Cocoa app the status of a job executed. Is thi...
TITLE: Can JVM created in Cocoa project make call backs to the Cocoa project? QUESTION: I used JNI to create JVM in my Cocoa project (that has some UI components) and were able to make calls to JVM (another Java app) to start some jobs. Now I want the JVM to be able to call back to tell my Cocoa app the status of a jo...
[ "cocoa", "jvm", "java-native-interface" ]
0
0
129
1
0
2011-06-04T19:27:21.860000
2011-06-04T19:40:30.267000
6,238,906
6,238,915
How to colour text in C#
Given a Windows Forms application with a label: label18 = new Label(); label18.Text = "Installed and started"; this.Controls.Add(label18); How do you set the colour?
label18.ForeColor = Color.Red; for red forecolor or label18.BackColor = Color.Blue; for blue backcolor.
How to colour text in C# Given a Windows Forms application with a label: label18 = new Label(); label18.Text = "Installed and started"; this.Controls.Add(label18); How do you set the colour?
TITLE: How to colour text in C# QUESTION: Given a Windows Forms application with a label: label18 = new Label(); label18.Text = "Installed and started"; this.Controls.Add(label18); How do you set the colour? ANSWER: label18.ForeColor = Color.Red; for red forecolor or label18.BackColor = Color.Blue; for blue backcolor...
[ "c#", ".net", "winforms" ]
1
4
289
2
0
2011-06-04T19:28:29.377000
2011-06-04T19:30:13.477000
6,238,912
6,242,807
I need a creative way to access followers using the Twitter API for 10,000 usernames or more without hitting rate limits, in Ruby on Rails 3
How do I access the number of followers a user has on Twitter for 10,000 usernames or more each day? Needless to say this hits the rate limit. I was told there are creative ways to avoid the limit, but I can't find any. I also don't want to use or can't use authentication of users. I need to do it as an anonymous serve...
Give GET users/lookup a try. It lets you get user objects for 100 users in a single request. 10000 users / 100 user/request = 100 requests which will be easy to do in an hour let alone all day.
I need a creative way to access followers using the Twitter API for 10,000 usernames or more without hitting rate limits, in Ruby on Rails 3 How do I access the number of followers a user has on Twitter for 10,000 usernames or more each day? Needless to say this hits the rate limit. I was told there are creative ways t...
TITLE: I need a creative way to access followers using the Twitter API for 10,000 usernames or more without hitting rate limits, in Ruby on Rails 3 QUESTION: How do I access the number of followers a user has on Twitter for 10,000 usernames or more each day? Needless to say this hits the rate limit. I was told there a...
[ "ruby-on-rails-3", "twitter" ]
0
0
254
1
0
2011-06-04T19:29:32.997000
2011-06-05T12:08:38.333000
6,238,917
6,238,926
single character c-style string full of junk
It's a shame I can't figure out such basic thing about c++, but c-style strings are acting as I wouldn't expect. For example, I create it like this: char* cstr = new char[1]; It's initialized to: Íýýýýý««««««««îţ. Like normal, I can set just first char because others are not really existing (or I thought that they aren...
All C-style strings are null-terminated. So, a string initialized using new char[1] leaves you space for no characters. You can't set the first character to anything but \0, otherwise normal string operations will keep reading into memory until they find a zero. So use new char[2] instead.
single character c-style string full of junk It's a shame I can't figure out such basic thing about c++, but c-style strings are acting as I wouldn't expect. For example, I create it like this: char* cstr = new char[1]; It's initialized to: Íýýýýý««««««««îţ. Like normal, I can set just first char because others are not...
TITLE: single character c-style string full of junk QUESTION: It's a shame I can't figure out such basic thing about c++, but c-style strings are acting as I wouldn't expect. For example, I create it like this: char* cstr = new char[1]; It's initialized to: Íýýýýý««««««««îţ. Like normal, I can set just first char beca...
[ "c++", "string", "char" ]
2
6
448
5
0
2011-06-04T19:30:19.500000
2011-06-04T19:33:02.483000
6,238,919
6,238,950
How to install X264
I'm trying to make a program. When I run./configure, this is what I get: checking for X264... configure: WARNING: Test application not built (x264 codec missing). Either you have not installed x264, or you have not installed it with the Gtk+ interface. If you compile it from source, add these options to configure: --en...
I used this howto to install ffmpeg and x264 on my machine...
How to install X264 I'm trying to make a program. When I run./configure, this is what I get: checking for X264... configure: WARNING: Test application not built (x264 codec missing). Either you have not installed x264, or you have not installed it with the Gtk+ interface. If you compile it from source, add these option...
TITLE: How to install X264 QUESTION: I'm trying to make a program. When I run./configure, this is what I get: checking for X264... configure: WARNING: Test application not built (x264 codec missing). Either you have not installed x264, or you have not installed it with the Gtk+ interface. If you compile it from source...
[ "linux", "gtk", "dependencies", "x264" ]
0
1
14,115
1
0
2011-06-04T19:30:57.393000
2011-06-04T19:38:28.460000
6,238,931
6,238,989
How to overload the subscript operator with swig Python
I have a class which contains a std::vector where Foo is a class containing a key, value, comment, etc. Please note that there is a reason why I am using a vector and not a dictionary. I have overloaded the subscript operator in C++ such that foos["Key Name"] will search through the vector for a Foo object with key mat...
In straight Python, if you want to overload the subscript operator, you would create a __getitem__ and __setitem__ class method. As a simple example: class MyClass(object): def __init__(self): self.storage = {} def __getitem__(self, key): return self.storage[key] def __setitem__(self, key, value): self.storage[key] =...
How to overload the subscript operator with swig Python I have a class which contains a std::vector where Foo is a class containing a key, value, comment, etc. Please note that there is a reason why I am using a vector and not a dictionary. I have overloaded the subscript operator in C++ such that foos["Key Name"] will...
TITLE: How to overload the subscript operator with swig Python QUESTION: I have a class which contains a std::vector where Foo is a class containing a key, value, comment, etc. Please note that there is a reason why I am using a vector and not a dictionary. I have overloaded the subscript operator in C++ such that foo...
[ "c++", "python", "swig", "operator-keyword", "subscript" ]
3
5
2,573
2
0
2011-06-04T19:34:18.980000
2011-06-04T19:45:14.037000
6,238,946
6,239,292
Android launch applications detail page
I'm working on an application where I list the installed applications with the package manager. I can get the package name of the item clicked, but I'd like to then launch the details screen based on the package. So for instance if Dolphin Browser were selected in the list, you would then see the following image. How c...
Here is a fully working app with a ListActivity that lists all installed apps. When you click a package name, it opens the app details. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Intent for getting installed apps. Intent mainIntent = new Inte...
Android launch applications detail page I'm working on an application where I list the installed applications with the package manager. I can get the package name of the item clicked, but I'd like to then launch the details screen based on the package. So for instance if Dolphin Browser were selected in the list, you w...
TITLE: Android launch applications detail page QUESTION: I'm working on an application where I list the installed applications with the package manager. I can get the package name of the item clicked, but I'd like to then launch the details screen based on the package. So for instance if Dolphin Browser were selected ...
[ "java", "android", "android-intent" ]
17
12
15,897
4
0
2011-06-04T19:37:59.347000
2011-06-04T20:45:49.623000
6,238,949
6,238,955
Using PHP instead of JSON in jQuery instant search script
I have a Google Instant style search script written in jQuery which pulls results from the JSON BingAPI. How can I make my script pull content from a PHP script rather than the BingAPI? Here is my code: $(document).ready(function(){ $("#search").keyup(function(){ var search=$(this).val(); var keyword=encodeURIComponent...
Replace this: var yt_url='http://api.search.live.net/json.aspx?JsonType=callback&JsonCallback=?&Appid=642636B8B26344A69F5FA5C22A629A163752DC6B&query='+keyword+'&sources=web'; With your json suggest url var yt_url='http://yourwebsite/json.php?query='+keyword;
Using PHP instead of JSON in jQuery instant search script I have a Google Instant style search script written in jQuery which pulls results from the JSON BingAPI. How can I make my script pull content from a PHP script rather than the BingAPI? Here is my code: $(document).ready(function(){ $("#search").keyup(function()...
TITLE: Using PHP instead of JSON in jQuery instant search script QUESTION: I have a Google Instant style search script written in jQuery which pulls results from the JSON BingAPI. How can I make my script pull content from a PHP script rather than the BingAPI? Here is my code: $(document).ready(function(){ $("#search"...
[ "php", "javascript", "jquery", "html", "json" ]
1
2
702
1
0
2011-06-04T19:38:16.687000
2011-06-04T19:39:38.917000
6,238,962
6,238,999
Is there an app skeleton builder for Android?
I was using DroidDraw, working through the tutorials. Looking at the resulting XML and the Java code to tie them together, I was thinking that I could build a program to automate that process, so I started noodling something together. But before I go off and totally remake the wheel, I was wondering if something like t...
The built-in UI editor that comes with Eclipse used to be pretty crappy - however, it's now getting better and better. Rev 11, which is coming out soon will a lot of new and useful features also. Give it a try - I think you'll find this is the best tool.
Is there an app skeleton builder for Android? I was using DroidDraw, working through the tutorials. Looking at the resulting XML and the Java code to tie them together, I was thinking that I could build a program to automate that process, so I started noodling something together. But before I go off and totally remake ...
TITLE: Is there an app skeleton builder for Android? QUESTION: I was using DroidDraw, working through the tutorials. Looking at the resulting XML and the Java code to tie them together, I was thinking that I could build a program to automate that process, so I started noodling something together. But before I go off a...
[ "android", "android-layout" ]
3
0
2,807
3
0
2011-06-04T19:40:29.480000
2011-06-04T19:46:48.707000
6,238,966
6,238,983
Why adding a CodeIgniter constructor producing error 500
Hello everyone I have a site controller code as below..... when I try to execute this code I get a weird problem, If I take out the __construct() function everything works pretty well for me, but, as soon as I add that constructor function I get the error 500 internal server error can any one help me out?? Logged_in();...
Is this CI 2.0? In that case, use this for the constructor: public function __construct() { parent::__construct(); // your code }
Why adding a CodeIgniter constructor producing error 500 Hello everyone I have a site controller code as below..... when I try to execute this code I get a weird problem, If I take out the __construct() function everything works pretty well for me, but, as soon as I add that constructor function I get the error 500 int...
TITLE: Why adding a CodeIgniter constructor producing error 500 QUESTION: Hello everyone I have a site controller code as below..... when I try to execute this code I get a weird problem, If I take out the __construct() function everything works pretty well for me, but, as soon as I add that constructor function I get...
[ "php", "codeigniter" ]
3
6
2,403
1
0
2011-06-04T19:40:50.517000
2011-06-04T19:44:25.740000
6,238,967
6,238,998
How to fade out a form in a dialog after success
Scenario: Using jquery form plugin. The form appears in a dialog, created with jquery UI. After clicking submit a success message appears on the form. What I would like to do is to have the dialog fade out after the success message appears. Problem: I'm unclear how to structure the code to close on success and where to...
You have to submit the form using ajax to prevent the new page from loading. then use the callback in the ajax function to perform the.fadeout() on the div/form edit: i misunderstood the question. can probably help if you show the function called when the submit/login button is clicked
How to fade out a form in a dialog after success Scenario: Using jquery form plugin. The form appears in a dialog, created with jquery UI. After clicking submit a success message appears on the form. What I would like to do is to have the dialog fade out after the success message appears. Problem: I'm unclear how to st...
TITLE: How to fade out a form in a dialog after success QUESTION: Scenario: Using jquery form plugin. The form appears in a dialog, created with jquery UI. After clicking submit a success message appears on the form. What I would like to do is to have the dialog fade out after the success message appears. Problem: I'm...
[ "jquery-ui", "forms", "dialog", "fadeout" ]
0
0
1,417
1
0
2011-06-04T19:41:12.933000
2011-06-04T19:46:48.520000
6,238,973
6,239,005
How to count and check passed arguments?
How can I translate the following Ruby code to Bash? if ARGV.length == 0 abort "\nError: The project name is required. Aborting...\n\n" elsif ARGV.length > 2 abort "\nError: The program takes two arguments maximum. Aborting...\n\n" end
#!/bin/bash USAGE="$0: [subproject attribute]" if [ $# -lt 1 ]; then echo -e "Error: The project name is required.\n$USAGE" >&2; exit 1; fi if [ $# -gt 2 ]; then echo -e "Error: Two arguments maximum.\n$USAGE" >&2; exit 1; fi
How to count and check passed arguments? How can I translate the following Ruby code to Bash? if ARGV.length == 0 abort "\nError: The project name is required. Aborting...\n\n" elsif ARGV.length > 2 abort "\nError: The program takes two arguments maximum. Aborting...\n\n" end
TITLE: How to count and check passed arguments? QUESTION: How can I translate the following Ruby code to Bash? if ARGV.length == 0 abort "\nError: The project name is required. Aborting...\n\n" elsif ARGV.length > 2 abort "\nError: The program takes two arguments maximum. Aborting...\n\n" end ANSWER: #!/bin/bash USAG...
[ "ruby", "bash", "command-line" ]
6
5
5,907
3
0
2011-06-04T19:42:38.747000
2011-06-04T19:48:11.540000
6,238,985
6,239,124
How to get the objects from an array that have the same value for a given property?
I'm writing the servers list part of a new iOS SSH client, and I have a model RWServer which currently looks like this*: @interface RWServer: NSObject { NSString *_hostname; NSUInteger _port; NSString *_password; } @property(nonatomic, copy) NSString *hostname; @property(nonatomic, assign) NSUInteger port; @property(n...
(repost of my own comment, on request) What comes to my mind would be to have an NSDictionary where the key is the hostname, and the object would be an array of all servers with their ports and passwords and whatnot. Happy to have helped!:)
How to get the objects from an array that have the same value for a given property? I'm writing the servers list part of a new iOS SSH client, and I have a model RWServer which currently looks like this*: @interface RWServer: NSObject { NSString *_hostname; NSUInteger _port; NSString *_password; } @property(nonatomic,...
TITLE: How to get the objects from an array that have the same value for a given property? QUESTION: I'm writing the servers list part of a new iOS SSH client, and I have a model RWServer which currently looks like this*: @interface RWServer: NSObject { NSString *_hostname; NSUInteger _port; NSString *_password; } @p...
[ "objective-c", "nsarray", "foundation" ]
0
1
119
1
0
2011-06-04T19:44:47.170000
2011-06-04T20:12:45.927000
6,238,986
6,244,671
Persisted entites in an ArrayList gone missing in jspx using Spring Webflow 2.0
I'm writing a spring webflow with MVC and persistence scaffolded by Spring Roo. In this flow, the user is supposed to be creating multiple instances of one entity, which in turn is to be referenced from another entity. For simplicity, I'll dub these entities MyClass1 and MyClass2. I'm having a hard time figuring out ho...
D-O-(freakin')-H! The signature of Class1.persist() is public void Class1.persist(). Ahem. So will, apparently, quite effectively set the flowScope.class1 variable to null. By dropping the result -attribute will solve your (and my!) problem.:)
Persisted entites in an ArrayList gone missing in jspx using Spring Webflow 2.0 I'm writing a spring webflow with MVC and persistence scaffolded by Spring Roo. In this flow, the user is supposed to be creating multiple instances of one entity, which in turn is to be referenced from another entity. For simplicity, I'll ...
TITLE: Persisted entites in an ArrayList gone missing in jspx using Spring Webflow 2.0 QUESTION: I'm writing a spring webflow with MVC and persistence scaffolded by Spring Roo. In this flow, the user is supposed to be creating multiple instances of one entity, which in turn is to be referenced from another entity. For...
[ "spring-mvc", "spring-roo", "spring-webflow", "jspx" ]
0
1
951
1
0
2011-06-04T19:44:58.277000
2011-06-05T17:46:28.227000
6,238,992
6,239,010
Converting string to Date and DateTime
If I have a PHP string in the format of mm-dd-YYYY (for example, 10-16-2003), how do I properly convert that to a Date and then a DateTime in the format of YYYY-mm-dd? The only reason I ask for both Date and DateTime is because I need one in one spot, and the other in a different spot.
Use strtotime() on your first date then date('Y-m-d') to convert it back: $time = strtotime('10/16/2003'); $newformat = date('Y-m-d',$time); echo $newformat; // 2003-10-16 Make note that there is a difference between using forward slash / and hyphen - in the strtotime() function. To quote from php.net: Dates in the m...
Converting string to Date and DateTime If I have a PHP string in the format of mm-dd-YYYY (for example, 10-16-2003), how do I properly convert that to a Date and then a DateTime in the format of YYYY-mm-dd? The only reason I ask for both Date and DateTime is because I need one in one spot, and the other in a different ...
TITLE: Converting string to Date and DateTime QUESTION: If I have a PHP string in the format of mm-dd-YYYY (for example, 10-16-2003), how do I properly convert that to a Date and then a DateTime in the format of YYYY-mm-dd? The only reason I ask for both Date and DateTime is because I need one in one spot, and the oth...
[ "php", "string", "datetime", "date" ]
373
582
1,190,639
13
0
2011-06-04T19:46:07
2011-06-04T19:48:54.003000
6,238,993
6,239,327
Display pictures as hide or visible
Goal: When user start typing text or characters in the textbox txtSearch the picture picEnlarger will be hidden and be replaced by picture picXmark. In default, the picEnlarger will always display until input data will be applied in the textbox txtSearch. In order word, no data in textbox then display picEnlarger and h...
In theory you should be able to just use triggers for that, e.g. When text is entered one image will become visible while the other one will be hidden.
Display pictures as hide or visible Goal: When user start typing text or characters in the textbox txtSearch the picture picEnlarger will be hidden and be replaced by picture picXmark. In default, the picEnlarger will always display until input data will be applied in the textbox txtSearch. In order word, no data in te...
TITLE: Display pictures as hide or visible QUESTION: Goal: When user start typing text or characters in the textbox txtSearch the picture picEnlarger will be hidden and be replaced by picture picXmark. In default, the picEnlarger will always display until input data will be applied in the textbox txtSearch. In order w...
[ "c#", "wpf", "image", "xaml", "visibility" ]
2
1
11,455
1
0
2011-06-04T19:46:13.693000
2011-06-04T20:51:34.020000
6,238,994
6,243,215
How to execute custom js after jQuery Mobile has created a new page div?
So I am using Django 1.3 and jQuery Mobile for a webapp. When trying to create new functionality or override some of jQM's functionality I don't seem to be able to get it to excute some code on page creation. I am still hackish at js, but it seems to be a bigger problem than myself How to execute JavaScript after a pag...
Look at the documentation here: http://jquerymobile.com/demos/1.0a4.1/#docs/api/events.html $('div').live('pageshow',function(event, ui){ alert('This page was just hidden: '+ ui.prevPage); }); $('div').live('pagehide',function(event, ui){ alert('This page was just shown: '+ ui.nextPage); }); One small note is that all...
How to execute custom js after jQuery Mobile has created a new page div? So I am using Django 1.3 and jQuery Mobile for a webapp. When trying to create new functionality or override some of jQM's functionality I don't seem to be able to get it to excute some code on page creation. I am still hackish at js, but it seems...
TITLE: How to execute custom js after jQuery Mobile has created a new page div? QUESTION: So I am using Django 1.3 and jQuery Mobile for a webapp. When trying to create new functionality or override some of jQM's functionality I don't seem to be able to get it to excute some code on page creation. I am still hackish a...
[ "javascript", "jquery", "jquery-mobile" ]
1
1
3,629
1
0
2011-06-04T19:46:28.627000
2011-06-05T13:27:36.683000
6,238,995
6,239,014
Splitting data between two databases- one is archive, one is active
I'm not sure the best way to design this, so here goes: I'm tracking students, papers, attendance, and grades through a current semester (now) and through a past set of semesters for reporting. Tables are partly keyed by semester. I've archived off old semesters to a second database because there is a lot of data and t...
Unless you're tracking grades for every class for every student at a major university, there is no need to archive anything. Keep them together in the same database. Expose a view of the current semester to "joe user" and require some additional security for history.
Splitting data between two databases- one is archive, one is active I'm not sure the best way to design this, so here goes: I'm tracking students, papers, attendance, and grades through a current semester (now) and through a past set of semesters for reporting. Tables are partly keyed by semester. I've archived off old...
TITLE: Splitting data between two databases- one is archive, one is active QUESTION: I'm not sure the best way to design this, so here goes: I'm tracking students, papers, attendance, and grades through a current semester (now) and through a past set of semesters for reporting. Tables are partly keyed by semester. I'v...
[ "sql-server-2005" ]
0
1
148
1
0
2011-06-04T19:46:29.340000
2011-06-04T19:50:08.137000
6,238,997
6,239,152
Android long-duration socket listener
My company has, in essence, undertaken a project to replace some of its pagers with stock smartphones running Android. As long as they are signed in, the device should be listening on a particular socket to receive "pages" from a server. My naive implementation was to create a foreground service that 1) kicked off a li...
The OS won't kill your process if you are using Service.startForground(). This is what things like music playback use, and you wouldn't want those to be killed after some amount of time. That said, for this kind of thing you generally wouldn't need to make your service foreground -- when the system does kill your proce...
Android long-duration socket listener My company has, in essence, undertaken a project to replace some of its pagers with stock smartphones running Android. As long as they are signed in, the device should be listening on a particular socket to receive "pages" from a server. My naive implementation was to create a fore...
TITLE: Android long-duration socket listener QUESTION: My company has, in essence, undertaken a project to replace some of its pagers with stock smartphones running Android. As long as they are signed in, the device should be listening on a particular socket to receive "pages" from a server. My naive implementation wa...
[ "android" ]
1
4
1,316
2
0
2011-06-04T19:46:45.663000
2011-06-04T20:18:22.320000
6,239,008
6,239,030
Fade in after acreate a span
i would like to create the span class error, and fade it if(formName == '') { $("#name").after(' Put your name please '); $(".error").fadeIn("slow"); hasError = true; } What is missing me here? Thanks
Your problem is that you create the span and it's already shown when you create it. Try hiding it and then fading it in: $(".error").hide().fadeIn("slow"); This may not produce a desirable result if you have multiple elements with the class error, however. To fix that, try something like this: var error=$(' ').addClass...
Fade in after acreate a span i would like to create the span class error, and fade it if(formName == '') { $("#name").after(' Put your name please '); $(".error").fadeIn("slow"); hasError = true; } What is missing me here? Thanks
TITLE: Fade in after acreate a span QUESTION: i would like to create the span class error, and fade it if(formName == '') { $("#name").after(' Put your name please '); $(".error").fadeIn("slow"); hasError = true; } What is missing me here? Thanks ANSWER: Your problem is that you create the span and it's already shown...
[ "jquery" ]
0
3
178
3
0
2011-06-04T19:48:48.087000
2011-06-04T19:52:37.393000
6,239,012
6,239,092
Convert Created Time using Javascript FQL Facebook
I am using Facebook FQL to get photos and the time when they were created. The problem is am getting the created time as some long integer value e.g. 1306776492. Now I am unable to convert it to proper date time using javascript. Can anyone point me in the right direction
You can set a Date objects time with the setTime method. var d = new Date(); d.setTime(1306776492*1000); document.write(d); returns Mon May 30 2011 20:28:12 GMT+0300 (FLE Daylight Time) http://jsfiddle.net/niklasvh/ANRcm/ If you want the date to be printed in a different format, just have a look at the other methods av...
Convert Created Time using Javascript FQL Facebook I am using Facebook FQL to get photos and the time when they were created. The problem is am getting the created time as some long integer value e.g. 1306776492. Now I am unable to convert it to proper date time using javascript. Can anyone point me in the right direct...
TITLE: Convert Created Time using Javascript FQL Facebook QUESTION: I am using Facebook FQL to get photos and the time when they were created. The problem is am getting the created time as some long integer value e.g. 1306776492. Now I am unable to convert it to proper date time using javascript. Can anyone point me i...
[ "javascript", "facebook-fql" ]
0
0
1,012
1
0
2011-06-04T19:49:19.010000
2011-06-04T20:06:15.477000
6,239,016
6,245,290
High level Java security framework
What security framework do you use in your Java projects? I used Spring Security and Apache Shiro and they both look immature. Spring Security flaws: no native support for permissions; no ability to use explicitly in Java code (sometimes it's necessary); too much focused on classic (non AJAX) web applications. Apache S...
As for Apache Shiro: I'm not sure why you've listed the things you did: Every project in the world has release bugs, without question. The big key here however is that Shiro's team is responsive and fixes them ASAP. This is not something to evaluate a framework on, otherwise you'd eliminate every framework, including a...
High level Java security framework What security framework do you use in your Java projects? I used Spring Security and Apache Shiro and they both look immature. Spring Security flaws: no native support for permissions; no ability to use explicitly in Java code (sometimes it's necessary); too much focused on classic (n...
TITLE: High level Java security framework QUESTION: What security framework do you use in your Java projects? I used Spring Security and Apache Shiro and they both look immature. Spring Security flaws: no native support for permissions; no ability to use explicitly in Java code (sometimes it's necessary); too much foc...
[ "java", "security", "spring-security", "shiro" ]
19
16
4,841
4
0
2011-06-04T19:50:23.317000
2011-06-05T19:24:53.470000
6,239,017
6,239,198
What is the MXML syntax to assign properties of subcomponents in custom MXML Components?
I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent properties via MXML. For instance I might want to adjust the font color or style for the lab...
You can't daisy chain down an display hierarchy w/ the MXML tag/value. You can do it in ActionScript, as you specified, but even that would probably be considered a bad practice. I'll point out that color on the Label and fontStyle on the TextInput are not properties. They are styles So, the code you have: myInput.cLab...
What is the MXML syntax to assign properties of subcomponents in custom MXML Components? I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent pro...
TITLE: What is the MXML syntax to assign properties of subcomponents in custom MXML Components? QUESTION: I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing publi...
[ "apache-flex", "syntax", "mxml" ]
0
1
831
1
0
2011-06-04T19:50:32.163000
2011-06-04T20:28:55.143000
6,239,022
6,239,045
Numeric type signature
Is it possible to create a type with a numeric argument? i.e. if I want to create a type of integers with a fixed bit-width: newtype FixedWidth w = FixedWidth Integer addFixedWidth:: FixedWidth w -> FixedWidth w -> FixedWidth (w+1) mulFixedWidth:: FixedWidth w -> FixedWidth w -> FixedWidth (2*w) So that the type-check...
The feature you are looking for is type-level naturals, know as the -XTypeNats extension to Haskell. At the moment this is possibly only in an experimental branch of GHC. It is likely to merge into GHC by 7.4 I think. Some further reading: TypeNats, GHC wiki page. Type-Level Naturals Basics Ticket #4385. The TypeNats b...
Numeric type signature Is it possible to create a type with a numeric argument? i.e. if I want to create a type of integers with a fixed bit-width: newtype FixedWidth w = FixedWidth Integer addFixedWidth:: FixedWidth w -> FixedWidth w -> FixedWidth (w+1) mulFixedWidth:: FixedWidth w -> FixedWidth w -> FixedWidth (2*w)...
TITLE: Numeric type signature QUESTION: Is it possible to create a type with a numeric argument? i.e. if I want to create a type of integers with a fixed bit-width: newtype FixedWidth w = FixedWidth Integer addFixedWidth:: FixedWidth w -> FixedWidth w -> FixedWidth (w+1) mulFixedWidth:: FixedWidth w -> FixedWidth w -...
[ "haskell", "types", "type-systems", "type-level-computation" ]
9
10
167
1
0
2011-06-04T19:51:09.890000
2011-06-04T19:55:32.270000
6,239,032
6,239,035
Do you really need to specify the type attribute?
Possible Duplicate: Why write
Most people are used to HTML 4/XHTML and before, where the type attribute is required for these elements. In regards to HTML 5, these are indeed optional and the spec gives a default, depending on the element. For the script tag, this defaults to text/javascript: If the language is not that described by "text/javascrip...
Do you really need to specify the type attribute? Possible Duplicate: Why write
TITLE: Do you really need to specify the type attribute? QUESTION: Possible Duplicate: Why write ANSWER: Most people are used to HTML 4/XHTML and before, where the type attribute is required for these elements. In regards to HTML 5, these are indeed optional and the spec gives a default, depending on the element. For...
[ "javascript", "css", "html", "tags", "mime-types" ]
18
23
7,589
6
0
2011-06-04T19:52:57.843000
2011-06-04T19:54:14.337000
6,239,033
6,239,046
end and start new UL every 10 mysql results
all i want to do is end the current, and begin a new UL every 10 results heres my code which isn't working 100%: $sql1 = mysql_query("select * from `provinces` order by `name` asc"); while ($row1 = mysql_fetch_assoc($sql1)) { echo ' '; echo ' '; $sql2 = mysql_query("select * from `cities` where `id_province`='".$row1...
replace this if ($count % 10 == 0) echo ' '; with if ($count % 10 == 0) echo ' '; And completly remove the second check if ($count % 10 == 0) echo ' '; Otherwise your html screws up // took me some time to get this answered because the problem was not easy to indentify:)
end and start new UL every 10 mysql results all i want to do is end the current, and begin a new UL every 10 results heres my code which isn't working 100%: $sql1 = mysql_query("select * from `provinces` order by `name` asc"); while ($row1 = mysql_fetch_assoc($sql1)) { echo ' '; echo ' '; $sql2 = mysql_query("select ...
TITLE: end and start new UL every 10 mysql results QUESTION: all i want to do is end the current, and begin a new UL every 10 results heres my code which isn't working 100%: $sql1 = mysql_query("select * from `provinces` order by `name` asc"); while ($row1 = mysql_fetch_assoc($sql1)) { echo ' '; echo ' '; $sql2 = my...
[ "php", "mysql", "html-lists" ]
1
5
187
2
0
2011-06-04T19:53:51.750000
2011-06-04T19:55:52.717000
6,239,042
6,277,546
One access token for OAuth using Twitter API
I would like to use a one access token with OAuth to make calls to the Twitter API. I am NOT trying to build a web application but rather trying to harvest data from Twitter to perform some analysis. I would like to collect three types of data: followers, friends and user information including status updates. I am able...
I used the Python-Oauth2 library to achieve a one access token.
One access token for OAuth using Twitter API I would like to use a one access token with OAuth to make calls to the Twitter API. I am NOT trying to build a web application but rather trying to harvest data from Twitter to perform some analysis. I would like to collect three types of data: followers, friends and user in...
TITLE: One access token for OAuth using Twitter API QUESTION: I would like to use a one access token with OAuth to make calls to the Twitter API. I am NOT trying to build a web application but rather trying to harvest data from Twitter to perform some analysis. I would like to collect three types of data: followers, f...
[ "python", "oauth", "twitter", "twitter-oauth" ]
0
1
1,547
2
0
2011-06-04T19:55:08.200000
2011-06-08T10:48:50.630000
6,239,052
6,239,230
MySQL performance issue
I want to build a visual table where I can see the following things: Team - Basketball stats about the team. Number In League - The position that team is on each stat in the league. League Average - The league average on each stat. I have the following tables in my DB: gamesstats: Have the stats on all games(what teams...
If we keep in mind that AVG(x) = SUM(x) / count(x) and that AVG(x) + AVG(y) = SUM(x+y) / count(x) Then we can speed up this query using SUM() and COUNT(). However this will only work if there are no null rows! $p2pQuery = '100*SUM(s.P2M)/SUM(s.P2A)'; $p3pQuery = '100*SUM(s.P3M)/SUM(s.P3A)'; $ftpQuery = '100*SUM(s.FTM)/...
MySQL performance issue I want to build a visual table where I can see the following things: Team - Basketball stats about the team. Number In League - The position that team is on each stat in the league. League Average - The league average on each stat. I have the following tables in my DB: gamesstats: Have the stats...
TITLE: MySQL performance issue QUESTION: I want to build a visual table where I can see the following things: Team - Basketball stats about the team. Number In League - The position that team is on each stat in the league. League Average - The league average on each stat. I have the following tables in my DB: gamessta...
[ "php", "mysql" ]
1
2
201
1
0
2011-06-04T19:57:33.853000
2011-06-04T20:33:27.197000
6,239,061
6,239,069
Regular Expression to remove everything but characters and numbers
I would like to remove everything but the Characters a-z,A-Z and 0-9 from a String so I need to create a regular expression for Java's string.replaceAll(regex, ""); The old string would look like this: MAX EUK_1334-PP/B+ The new string should look like this: MAXEUK1334PPB
There's probably a more concise regex, but this will certainly work: string.replaceAll("[^a-zA-Z0-9]", "");
Regular Expression to remove everything but characters and numbers I would like to remove everything but the Characters a-z,A-Z and 0-9 from a String so I need to create a regular expression for Java's string.replaceAll(regex, ""); The old string would look like this: MAX EUK_1334-PP/B+ The new string should look like ...
TITLE: Regular Expression to remove everything but characters and numbers QUESTION: I would like to remove everything but the Characters a-z,A-Z and 0-9 from a String so I need to create a regular expression for Java's string.replaceAll(regex, ""); The old string would look like this: MAX EUK_1334-PP/B+ The new string...
[ "java", "regex" ]
31
82
65,933
6
0
2011-06-04T20:00:19.440000
2011-06-04T20:01:55.853000
6,239,072
6,239,153
POST request using ASIHTTPRequest doesn't reach PHP script
I've got an iPhone app sending data to my server with a post request: -(void) sendDataToServer:(NSString*)myString { NSURL *url = [NSURL URLWithString:@"http://site.com/script.php"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request addRequestHeader:@"Name" value:myString]; [request startAsynchron...
You are setting a Header, but want you want is [request appendPostData:[@"This is my data" dataUsingEncoding:NSUTF8StringEncoding]]; or: ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request addPostValue:@"Ben" forKey:@"name"];
POST request using ASIHTTPRequest doesn't reach PHP script I've got an iPhone app sending data to my server with a post request: -(void) sendDataToServer:(NSString*)myString { NSURL *url = [NSURL URLWithString:@"http://site.com/script.php"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request addReq...
TITLE: POST request using ASIHTTPRequest doesn't reach PHP script QUESTION: I've got an iPhone app sending data to my server with a post request: -(void) sendDataToServer:(NSString*)myString { NSURL *url = [NSURL URLWithString:@"http://site.com/script.php"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url...
[ "php", "iphone", "objective-c", "asihttprequest" ]
0
2
1,172
1
0
2011-06-04T20:02:32.220000
2011-06-04T20:18:22.773000
6,239,073
6,239,122
2D Array - Menu in C
My program is crashing. Basically, the data is not passing through the array for the menu choice and I am wondering if anyone could check it over and see where the problem is. #include #include void print_main_menu(char menu_items[5][10], int number_of_items) { int i; for (i = 0; i < number_of_items; i++) { printf("%s\...
First off: you declared your function as print_main_menu but you are calling it as print_main but this should resolve into a compilation error. Secondly: you are using the two dimensional array incorrectly, apparantly you are using it as a two dimensional array of C strings, but you declared it as an array of character...
2D Array - Menu in C My program is crashing. Basically, the data is not passing through the array for the menu choice and I am wondering if anyone could check it over and see where the problem is. #include #include void print_main_menu(char menu_items[5][10], int number_of_items) { int i; for (i = 0; i < number_of_item...
TITLE: 2D Array - Menu in C QUESTION: My program is crashing. Basically, the data is not passing through the array for the menu choice and I am wondering if anyone could check it over and see where the problem is. #include #include void print_main_menu(char menu_items[5][10], int number_of_items) { int i; for (i = 0; ...
[ "c", "arrays", "menu", "2d" ]
2
3
1,472
4
0
2011-06-04T20:02:36.440000
2011-06-04T20:12:35.163000
6,239,079
6,239,120
how do I read a 24 bit int of out of a haskell bytestring?
I'm trying to parse a binary format (PES) using Haskell: import qualified Data.ByteString.Lazy as BL import Data.Word import Data.Word.Word24 import qualified Data.ByteString.Lazy.Char8 as L8 data Stitch = MyCoord Int Int deriving (Eq, Show) data PESFile = PESFile { pecstart:: Word24, width:: Int, height:: Int, numCo...
Well, you can parse a 24 bit value out by indexing 3 bytes (here in network order): import qualified Data.ByteString as B import Data.ByteString (ByteString, index) import Data.Bits import Data.Int import Data.Word type Int24 = Int32 readInt24:: ByteString -> (Int24, ByteString) readInt24 bs = (roll [a,b,c], B.drop 3...
how do I read a 24 bit int of out of a haskell bytestring? I'm trying to parse a binary format (PES) using Haskell: import qualified Data.ByteString.Lazy as BL import Data.Word import Data.Word.Word24 import qualified Data.ByteString.Lazy.Char8 as L8 data Stitch = MyCoord Int Int deriving (Eq, Show) data PESFile = PE...
TITLE: how do I read a 24 bit int of out of a haskell bytestring? QUESTION: I'm trying to parse a binary format (PES) using Haskell: import qualified Data.ByteString.Lazy as BL import Data.Word import Data.Word.Word24 import qualified Data.ByteString.Lazy.Char8 as L8 data Stitch = MyCoord Int Int deriving (Eq, Show) ...
[ "haskell", "binary", "bytestring" ]
4
6
792
1
0
2011-06-04T20:03:50.820000
2011-06-04T20:12:17.080000
6,239,084
6,239,263
create CvMat from a C++ vector of CvPoint2D32f
I am trying to create a CvMat data structure using cvMat() in OpenCV. The last parameter of cvMat() expects a void* to the data. My data is stored in the following data structure vector > data; I expected data.at(0) to work as the last parameter, but the compiler says that it can not convert to void*. What path should ...
data.at(0) has vector type, but you need pointer to the first element of that vector. Try: &(data.at(0).at(0)) Also keep in mind, that vector > is not a two dimensional array of CvPoint2D32f. It is more like "vector of references" to one dimensional arrays.
create CvMat from a C++ vector of CvPoint2D32f I am trying to create a CvMat data structure using cvMat() in OpenCV. The last parameter of cvMat() expects a void* to the data. My data is stored in the following data structure vector > data; I expected data.at(0) to work as the last parameter, but the compiler says that...
TITLE: create CvMat from a C++ vector of CvPoint2D32f QUESTION: I am trying to create a CvMat data structure using cvMat() in OpenCV. The last parameter of cvMat() expects a void* to the data. My data is stored in the following data structure vector > data; I expected data.at(0) to work as the last parameter, but the ...
[ "c++", "c", "opencv" ]
2
3
1,505
1
0
2011-06-04T20:04:41.463000
2011-06-04T20:40:14.490000
6,239,088
6,242,385
Is it possible to cross-compile D source code for MIPS?
Is it possible to cross-compile D source code for MIPS? For example, I want to compile a D "Hello, world." program that will run on TI AR7-based devices, which have MIPS32 processor and typically run Linux 2.4.17 kernel with MontaVista patches and uClibc (using the MIPS I generic target; ELF 32-bit LSB executable, MIPS...
The reference compiler, DMD, does not generate MIPS code, so you'll have to use GDC and LDC2, which support generating code for whatever architectures their backends support ( GCC and LLVM, respectively). However, it's not a simple as generating the code. To get all of D's features workable, you'll need to port druntim...
Is it possible to cross-compile D source code for MIPS? Is it possible to cross-compile D source code for MIPS? For example, I want to compile a D "Hello, world." program that will run on TI AR7-based devices, which have MIPS32 processor and typically run Linux 2.4.17 kernel with MontaVista patches and uClibc (using th...
TITLE: Is it possible to cross-compile D source code for MIPS? QUESTION: Is it possible to cross-compile D source code for MIPS? For example, I want to compile a D "Hello, world." program that will run on TI AR7-based devices, which have MIPS32 processor and typically run Linux 2.4.17 kernel with MontaVista patches an...
[ "d", "mips", "cross-compiling", "mips32", "texas-instruments" ]
6
7
603
1
0
2011-06-04T20:05:16.533000
2011-06-05T10:39:58.310000
6,239,090
6,283,565
Reload vs Refresh
I have this script It just writes "Hello World" and set the cache to expire on next Saturday. Now, when I load this page in FireFox and click on reload button, it makes a new request to server to load the page instead of just serving it from cache (I think to ensure if last-modified is still valid). However, if I put m...
I think the terms 'refresh' and 'reload' are basically synonymous. I see this line in RFC 2616 that describes HTTP/1.1 caching that provides a possible slight difference: An expiration time cannot be used to force a user agent to refresh its display or reload a resource In other words, perhaps you could say refreshing ...
Reload vs Refresh I have this script It just writes "Hello World" and set the cache to expire on next Saturday. Now, when I load this page in FireFox and click on reload button, it makes a new request to server to load the page instead of just serving it from cache (I think to ensure if last-modified is still valid). H...
TITLE: Reload vs Refresh QUESTION: I have this script It just writes "Hello World" and set the cache to expire on next Saturday. Now, when I load this page in FireFox and click on reload button, it makes a new request to server to load the page instead of just serving it from cache (I think to ensure if last-modified ...
[ "cache-control", "browser-cache" ]
6
21
11,630
2
0
2011-06-04T20:05:31.890000
2011-06-08T18:38:03.990000
6,239,096
6,239,104
output an associative array, from SQL Select with PHP
I think my mind is just drawing a blank, but basically, I want to create an associative array from various sql results The array needs to look like: $people = array( "+1123456789" => "Phil" ); Here is my SQL Statement $sql = " SELECT phonenumber6, firstName FROM members WHERE departmentID = 4 AND phonenumber6 <> '+1';"...
while($row=mysql_fetch_assoc($query)) { $people[$row['phonenumber6']] = $row['firstName']; } Addendum Dunno what you want to echo. Anyway the right syntax is: while($row=mysql_fetch_assoc($query)) { $people[$row['phonenumber6']] = $row['firstName']; echo $row['phonenumber6']. '=> '.$row['firstName']." \n"; }
output an associative array, from SQL Select with PHP I think my mind is just drawing a blank, but basically, I want to create an associative array from various sql results The array needs to look like: $people = array( "+1123456789" => "Phil" ); Here is my SQL Statement $sql = " SELECT phonenumber6, firstName FROM mem...
TITLE: output an associative array, from SQL Select with PHP QUESTION: I think my mind is just drawing a blank, but basically, I want to create an associative array from various sql results The array needs to look like: $people = array( "+1123456789" => "Phil" ); Here is my SQL Statement $sql = " SELECT phonenumber6, ...
[ "php", "sql", "associative-array" ]
0
3
2,477
2
0
2011-06-04T20:06:57.733000
2011-06-04T20:08:36.503000
6,239,101
6,239,128
ambiguous error: template C++
I've tried almost everything imaginable (apart from the right thing of course), but still can't see why I'm getting an ambiguous error. I am fairly certain it's something really silly but I just can't see it! My compiler shows warnings with the insertion operators and I know they're both being called but I was told sti...
CheckingAccountWithInterest inherits from two classes. Both of them support an operator<< that is equally likely to be the one that CheckingAccountWithInterest should use. It's irrelevant that they both call displayAccount(); the ambiguity occurs before the compiler ever gets there. You need to sort that ambiguity out.
ambiguous error: template C++ I've tried almost everything imaginable (apart from the right thing of course), but still can't see why I'm getting an ambiguous error. I am fairly certain it's something really silly but I just can't see it! My compiler shows warnings with the insertion operators and I know they're both b...
TITLE: ambiguous error: template C++ QUESTION: I've tried almost everything imaginable (apart from the right thing of course), but still can't see why I'm getting an ambiguous error. I am fairly certain it's something really silly but I just can't see it! My compiler shows warnings with the insertion operators and I k...
[ "c++", "ambiguous", "function-templates" ]
1
7
931
1
0
2011-06-04T20:07:51.630000
2011-06-04T20:14:29.793000
6,239,109
6,239,123
MySQL Query: count entries by status
I have a log table with following schema: OperatorId - JobId - Status ( Good/Bad/Ugly ) Alex 6 Good Alex 7 Good James 6 Bad Description: Whenever an operator works on a job, an entry is made along with Status. That's it. Now I need a report like: OperatorId - Good Count - Bad Count - Ugly Count Alex 2 0 0 James 0 1 0
select operatorid, sum(if(status="good",1,0)) as good, sum(if(status="bad",1,0)) as bad, sum(if(status="ugly",1,0)) as ugly from table group by operatorid
MySQL Query: count entries by status I have a log table with following schema: OperatorId - JobId - Status ( Good/Bad/Ugly ) Alex 6 Good Alex 7 Good James 6 Bad Description: Whenever an operator works on a job, an entry is made along with Status. That's it. Now I need a report like: OperatorId - Good Count - Bad Count ...
TITLE: MySQL Query: count entries by status QUESTION: I have a log table with following schema: OperatorId - JobId - Status ( Good/Bad/Ugly ) Alex 6 Good Alex 7 Good James 6 Bad Description: Whenever an operator works on a job, an entry is made along with Status. That's it. Now I need a report like: OperatorId - Good ...
[ "mysql", "sql" ]
0
2
232
3
0
2011-06-04T20:09:48.513000
2011-06-04T20:12:39.247000
6,239,115
6,239,212
iOS dynamically filling search results
I am building a small Search app on iPad. I want to show the search results. Do I use UIScrollView or UITableView? The number of search results are unknown & as the user scrolls vertically I'll want to dynamically keep fetching the results & fill whatever container I will be using. Something like what Google Reader (on...
This is an awesome question. I have a different approach for a solution to this problem. It is not the exact answer; But I would assume that the logic might be helpful - Algorithm: Decide on a certain number of records being pulled into the UITableView. (lets say 8 ). You can use a UIScrollView with a small size (rathe...
iOS dynamically filling search results I am building a small Search app on iPad. I want to show the search results. Do I use UIScrollView or UITableView? The number of search results are unknown & as the user scrolls vertically I'll want to dynamically keep fetching the results & fill whatever container I will be using...
TITLE: iOS dynamically filling search results QUESTION: I am building a small Search app on iPad. I want to show the search results. Do I use UIScrollView or UITableView? The number of search results are unknown & as the user scrolls vertically I'll want to dynamically keep fetching the results & fill whatever contain...
[ "objective-c", "ios", "uitableview", "ios4", "uiscrollview" ]
3
1
518
1
0
2011-06-04T20:11:05.597000
2011-06-04T20:30:55.020000
6,239,126
6,239,171
Save gzipped html file with PHP that is readable by browsers
I'm caching the main page of my site as a flat html file, and then with.htaccess loading that file if the user is not logged in (since no user specific info is displayed), instead of loading my entire php framework. The one downside to this is that PHP doesn't gzip the file automatically, since PHP is not even being us...
UPDATE: As OP discovered, ob_gzhandler() can deal with this sort of use case, and is not a bad way to go. ORIGINAL ANSWER: It is likely that, even if you manage to make this work somehow, it will result in poorer performance than simply having the file as a plain text file on your file system. If you want to take advan...
Save gzipped html file with PHP that is readable by browsers I'm caching the main page of my site as a flat html file, and then with.htaccess loading that file if the user is not logged in (since no user specific info is displayed), instead of loading my entire php framework. The one downside to this is that PHP doesn'...
TITLE: Save gzipped html file with PHP that is readable by browsers QUESTION: I'm caching the main page of my site as a flat html file, and then with.htaccess loading that file if the user is not logged in (since no user specific info is displayed), instead of loading my entire php framework. The one downside to this ...
[ "php", "gzip" ]
0
1
912
1
0
2011-06-04T20:13:16.827000
2011-06-04T20:22:42.117000
6,239,129
6,239,210
Using PHP rather than JSON as output in instant search script
I have a Google Instant style search script written in jQuery which I want to pull results from a PHP script. I know my script currently needs JSON as the output but I want it to output PHP generated HTML instead. How can I do this? Here is my code: $(document).ready(function(){ $("#search").keyup(function(){ var searc...
Just use dataType:"html", In your $.ajax call. The result will be returned as plain text, so if you just want to display it you can success:function(response){ $("#result").html(response); }
Using PHP rather than JSON as output in instant search script I have a Google Instant style search script written in jQuery which I want to pull results from a PHP script. I know my script currently needs JSON as the output but I want it to output PHP generated HTML instead. How can I do this? Here is my code: $(docume...
TITLE: Using PHP rather than JSON as output in instant search script QUESTION: I have a Google Instant style search script written in jQuery which I want to pull results from a PHP script. I know my script currently needs JSON as the output but I want it to output PHP generated HTML instead. How can I do this? Here is...
[ "php", "javascript", "jquery", "html", "json" ]
3
3
342
2
0
2011-06-04T20:14:30.913000
2011-06-04T20:30:37.117000
6,239,137
6,239,192
Loop through array & fetch data from Core-Data
I've got an array of 200 numbers (item ids) and I want to get some data from core data for each item using its item id. I am assuming the only way to do so is to query core data within a loop performing the fetchRequest in each iteration and adding the results to a mutable array. This seems like a memory hog and loopin...
It would be best to use a predicate. For example: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; // Set the entity for the fetch request. NSEntityDescription *entity = [NSEntityDescription entityForName:@"EntityName" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; NSPredic...
Loop through array & fetch data from Core-Data I've got an array of 200 numbers (item ids) and I want to get some data from core data for each item using its item id. I am assuming the only way to do so is to query core data within a loop performing the fetchRequest in each iteration and adding the results to a mutable...
TITLE: Loop through array & fetch data from Core-Data QUESTION: I've got an array of 200 numbers (item ids) and I want to get some data from core data for each item using its item id. I am assuming the only way to do so is to query core data within a loop performing the fetchRequest in each iteration and adding the re...
[ "iphone", "ios", "core-data" ]
3
5
3,222
1
0
2011-06-04T20:15:50.353000
2011-06-04T20:27:56.407000
6,239,142
6,239,233
How to change the priority of a running java process?
In a related question we explored using ProcessBuilder to start external processes in low priority using OS-dependant commands. I also discovered that if a parent process is low priority, then all of its spawned processes start in low priority. So my new question is about starting a java file (run via double-clicking a...
https://stackoverflow.com/questions/257859 discusses how to change the priority of a thread in Windows. I don't know of any Java API to do this, so you're going to have to fall back on JNI to call into the Windows API. In your shoes I think I'd start with JNA which will let you map the functions easily, or find a ready...
How to change the priority of a running java process? In a related question we explored using ProcessBuilder to start external processes in low priority using OS-dependant commands. I also discovered that if a parent process is low priority, then all of its spawned processes start in low priority. So my new question is...
TITLE: How to change the priority of a running java process? QUESTION: In a related question we explored using ProcessBuilder to start external processes in low priority using OS-dependant commands. I also discovered that if a parent process is low priority, then all of its spawned processes start in low priority. So ...
[ "java", "windows", "process", "windows-task-scheduler" ]
3
3
12,706
4
0
2011-06-04T20:17:10.917000
2011-06-04T20:34:03.070000
6,239,148
6,239,268
Travelling Salesman with multiple salesmen?
I have a problem that has been effectively reduced to a Travelling Salesman Problem with multiple salesmen. I have a list of cities to visit from an initial location, and have to visit all cities with a limited number of salesmen. I am trying to come up with a heuristic and was wondering if anyone could give a hand. Fo...
TSP is a difficult problem. Multi-TSP is probably much worse. I'm not sure you can find good solutions with ad-hoc methods like this. Have you tried meta-heuristic methods? I'd try using the Cross Entropy method first: it shouldn't be too hard to use it for your problem. Otherwise look for Generic Algorithms, Ant Colon...
Travelling Salesman with multiple salesmen? I have a problem that has been effectively reduced to a Travelling Salesman Problem with multiple salesmen. I have a list of cities to visit from an initial location, and have to visit all cities with a limited number of salesmen. I am trying to come up with a heuristic and w...
TITLE: Travelling Salesman with multiple salesmen? QUESTION: I have a problem that has been effectively reduced to a Travelling Salesman Problem with multiple salesmen. I have a list of cities to visit from an initial location, and have to visit all cities with a limited number of salesmen. I am trying to come up with...
[ "algorithm", "heuristics", "traveling-salesman" ]
31
12
19,373
8
0
2011-06-04T20:17:57.260000
2011-06-04T20:41:12.383000
6,239,154
6,239,173
comparing two string[]
throwing me an error here: string.Compare(list[], list1[],true); <<<<<< is causing the error. string[] list = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "v", "z" }; string[] list1 = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l...
Use SequenceEqual of Linq to check if string arrays are same http://msdn.microsoft.com/en-us/library/bb348567.aspx
comparing two string[] throwing me an error here: string.Compare(list[], list1[],true); <<<<<< is causing the error. string[] list = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "v", "z" }; string[] list1 = { "a", "b", "c", "d", "e", "f", "g",...
TITLE: comparing two string[] QUESTION: throwing me an error here: string.Compare(list[], list1[],true); <<<<<< is causing the error. string[] list = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "v", "z" }; string[] list1 = { "a", "b", "c", "...
[ "c#", "asp.net" ]
3
5
2,424
4
0
2011-06-04T20:18:39.293000
2011-06-04T20:22:54.580000
6,239,155
6,239,174
PHP foreach issue with empty fields
I have a big form This form is processed by a PHP file called by a serialize jQuery function foreach($_GET['claimant'] as $k=>$v) { $insClaim = "INSERT INTO `cR_Claimants` (`memberID`, `ParentSubmission`, `Name`, `DOB`, `Company`, `Email`, `MainPhone`, `OtherPhone`, `MobilePhone`, `OwnershipPercentage`, `Address`, `ZIP...
If $_GET['claimant'] is an array, you should ask for its length: if (count($_GET['claimant']) > 0) {... }
PHP foreach issue with empty fields I have a big form This form is processed by a PHP file called by a serialize jQuery function foreach($_GET['claimant'] as $k=>$v) { $insClaim = "INSERT INTO `cR_Claimants` (`memberID`, `ParentSubmission`, `Name`, `DOB`, `Company`, `Email`, `MainPhone`, `OtherPhone`, `MobilePhone`, `O...
TITLE: PHP foreach issue with empty fields QUESTION: I have a big form This form is processed by a PHP file called by a serialize jQuery function foreach($_GET['claimant'] as $k=>$v) { $insClaim = "INSERT INTO `cR_Claimants` (`memberID`, `ParentSubmission`, `Name`, `DOB`, `Company`, `Email`, `MainPhone`, `OtherPhone`,...
[ "php", "foreach" ]
2
2
861
3
0
2011-06-04T20:18:39.403000
2011-06-04T20:23:09.077000