PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
6,046,168
05/18/2011 14:14:05
543,315
09/17/2010 10:15:06
1
2
For Mongodb is it better to reference an object or use a natural String key?
I am building a corpus of indexed sentences in different languages. I have a collection of Languages which have both an ObjectId and the ISO code as a key. Is it better to use a reference to the Language collection or store a key like "en" or "fr"? I suppose it's a compromise between: - ease of referencing the Language - object in that collection - speed in doing queries where the sentence has a certain language - the size of the data on disk Any best practices that I should know of?
mongodb
null
null
null
null
null
open
For Mongodb is it better to reference an object or use a natural String key? === I am building a corpus of indexed sentences in different languages. I have a collection of Languages which have both an ObjectId and the ISO code as a key. Is it better to use a reference to the Language collection or store a key like "en" or "fr"? I suppose it's a compromise between: - ease of referencing the Language - object in that collection - speed in doing queries where the sentence has a certain language - the size of the data on disk Any best practices that I should know of?
0
4,873,911
02/02/2011 11:30:10
465,076
10/03/2010 09:30:58
192
24
How to insert schemalocation in a xml document via DOM
i create a xml document with JAXP and search a way to insert the schemalocation. At the moment my application produces: <?xml version="1.0" encoding="UTF-8"?> <root> ... </root> But i need: <?xml version="1.0" encoding="UTF-8"?> <root xmlns="namespaceURL" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="namespaceURL pathToMySchema.xsd"> ... </root> My code: StreamResult result = new StreamResult(writer); Document doc = getDocument(); Transformer trans = transfac.newTransformer(); trans.setOutputProperty(OutputKeys.INDENT, "yes"); trans.setOutputProperty(OutputKeys.METHOD, "xml"); trans.setOutputProperty(OutputKeys.VERSION, "1.0"); trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); DOMSource source = new DOMSource(depl.getAsElement(doc)); trans.transform(source, result); Thanks for your time, Kasten
dom
xsd
jaxp
null
null
null
open
How to insert schemalocation in a xml document via DOM === i create a xml document with JAXP and search a way to insert the schemalocation. At the moment my application produces: <?xml version="1.0" encoding="UTF-8"?> <root> ... </root> But i need: <?xml version="1.0" encoding="UTF-8"?> <root xmlns="namespaceURL" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="namespaceURL pathToMySchema.xsd"> ... </root> My code: StreamResult result = new StreamResult(writer); Document doc = getDocument(); Transformer trans = transfac.newTransformer(); trans.setOutputProperty(OutputKeys.INDENT, "yes"); trans.setOutputProperty(OutputKeys.METHOD, "xml"); trans.setOutputProperty(OutputKeys.VERSION, "1.0"); trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); DOMSource source = new DOMSource(depl.getAsElement(doc)); trans.transform(source, result); Thanks for your time, Kasten
0
3,311,559
07/22/2010 17:21:54
406,143
07/22/2010 16:58:20
1
0
Too many lookup tables
What are the adverse effects of having too many lookup tables in the database? I have to incorportate too many Enumerations, based on the applications. What would experts advice?
sql-server
database-design
enums
null
null
null
open
Too many lookup tables === What are the adverse effects of having too many lookup tables in the database? I have to incorportate too many Enumerations, based on the applications. What would experts advice?
0
9,990,413
04/03/2012 09:18:39
851,755
07/19/2011 10:22:40
4
1
What is this PHP code in VB.net
I am looking for the vb.net equivalent of this function: I have no experience of PHP but came across this code which apparently gives you a random image url from google images function GetRandomImageURL($topic='', $min=0, $max=100) { // get random image from Google if ($topic=='') $topic='image'; $ofs=mt_rand($min, $max); $geturl='http://www.google.ca/images?q=' . $topic . '&start=' . $ofs . '&gbv=1'; $data=file_get_contents($geturl); $f1='<div id="center_col">'; $f2='<a href="/imgres?imgurl='; $f3='&amp;imgrefurl='; $pos1=strpos($data, $f1)+strlen($f1); if ($pos1==FALSE) return FALSE; $pos2=strpos($data, $f2, $pos1)+strlen($f2); if ($pos2==FALSE) return FALSE; $pos3=strpos($data, $f3, $pos2); if ($pos3==FALSE) return FALSE; return substr($data, $pos2, $pos3-$pos2); }
php
vb.net
null
null
null
04/15/2012 21:12:48
too localized
What is this PHP code in VB.net === I am looking for the vb.net equivalent of this function: I have no experience of PHP but came across this code which apparently gives you a random image url from google images function GetRandomImageURL($topic='', $min=0, $max=100) { // get random image from Google if ($topic=='') $topic='image'; $ofs=mt_rand($min, $max); $geturl='http://www.google.ca/images?q=' . $topic . '&start=' . $ofs . '&gbv=1'; $data=file_get_contents($geturl); $f1='<div id="center_col">'; $f2='<a href="/imgres?imgurl='; $f3='&amp;imgrefurl='; $pos1=strpos($data, $f1)+strlen($f1); if ($pos1==FALSE) return FALSE; $pos2=strpos($data, $f2, $pos1)+strlen($f2); if ($pos2==FALSE) return FALSE; $pos3=strpos($data, $f3, $pos2); if ($pos3==FALSE) return FALSE; return substr($data, $pos2, $pos3-$pos2); }
3
10,421,966
05/02/2012 21:25:01
603,588
02/04/2011 18:05:34
334
14
Spring-Data mongodb querying multiple classes stored in the same collection
With Spring-Data, you can use the @Document annotation to specify which collection to save the object to. Say i have two classes, Student and Teacher, both persisted into the people collection. When I execute the following code: mongo.find(new Query(), Teacher.class); result contains both Student and Teacher. Looking in the data created by Spring-Data, each document contains a "_class" field which indicate which class it is persisted from. This is field not used in find as an filter to return only Teacher? How do I query if I only want to return Teacher saved in the people collection?
mongodb
spring-data
null
null
null
null
open
Spring-Data mongodb querying multiple classes stored in the same collection === With Spring-Data, you can use the @Document annotation to specify which collection to save the object to. Say i have two classes, Student and Teacher, both persisted into the people collection. When I execute the following code: mongo.find(new Query(), Teacher.class); result contains both Student and Teacher. Looking in the data created by Spring-Data, each document contains a "_class" field which indicate which class it is persisted from. This is field not used in find as an filter to return only Teacher? How do I query if I only want to return Teacher saved in the people collection?
0
8,616,154
12/23/2011 12:36:28
787,158
06/07/2011 09:13:37
20
0
stop ajax function in midway when other element is clicked
Hi have a page which has List data. When I click on an element of the list, an Ajax function is called which populates some date in the right column. Now wat's working:- i click on element -> i see the loading.gif a few seconds -> data gets loaded. When i click on other element midway, the first function completes and only then the second request is taken. What I want:- when i click and the ajax is loading, I click again in between, the previous function should stop, and my new request should be taken.
jquery
ajax
null
null
null
null
open
stop ajax function in midway when other element is clicked === Hi have a page which has List data. When I click on an element of the list, an Ajax function is called which populates some date in the right column. Now wat's working:- i click on element -> i see the loading.gif a few seconds -> data gets loaded. When i click on other element midway, the first function completes and only then the second request is taken. What I want:- when i click and the ajax is loading, I click again in between, the previous function should stop, and my new request should be taken.
0
1,520,973
10/05/2009 16:10:03
80,229
03/19/2009 21:13:16
95
10
Regex to detect Javascript In a string
I am trying to detect JavaScript in my querystrings value. I have the following c# code private bool checkForXSS(string value) { Regex regex = new Regex(@"/((\%3C)|<)[^\n]+((\%3E)|>)/I"); if (regex.Match(value).Success) return true; return false; } This works for detecting `<script></script>` tags but unfortunately if there were no tags a match is not reached. Is it possible for a regex to match on JavaScript keywords and semi-colons etc? Thanks
regex
xss
c#
javascript
null
null
open
Regex to detect Javascript In a string === I am trying to detect JavaScript in my querystrings value. I have the following c# code private bool checkForXSS(string value) { Regex regex = new Regex(@"/((\%3C)|<)[^\n]+((\%3E)|>)/I"); if (regex.Match(value).Success) return true; return false; } This works for detecting `<script></script>` tags but unfortunately if there were no tags a match is not reached. Is it possible for a regex to match on JavaScript keywords and semi-colons etc? Thanks
0
5,528,942
04/03/2011 10:12:59
667,355
03/19/2011 14:04:57
32
0
List of all .txt file
I want to write a program that give a path in my system and goes to that path and search in that path and sub-directory of path and list all of .txt file . please help me . thanks .
c++
c
qt
qt4
null
04/07/2011 05:46:46
not a real question
List of all .txt file === I want to write a program that give a path in my system and goes to that path and search in that path and sub-directory of path and list all of .txt file . please help me . thanks .
1
4,344,698
12/03/2010 10:37:44
447,244
09/01/2010 09:10:05
1
0
I want to design an invitation card for my wedding in silverlight
I want to make an Application in Silverlight for invitation of marriage Showing some Animation stuff
silverlight-4.0
null
null
null
null
01/08/2012 21:15:49
too localized
I want to design an invitation card for my wedding in silverlight === I want to make an Application in Silverlight for invitation of marriage Showing some Animation stuff
3
7,910,832
10/27/2011 01:37:33
1,015,681
10/27/2011 01:28:41
1
0
VB Script To Delete Header and Footer plus Append Text while exporting to new text file
Hi All VB Script Gurus, I am new to VB script world. I need some help on creating new VB script for the text file changes: I am receiving below sample text file data and needs to modify (append data) and export to new text file. OP01AMS06902APECS 20110905154741 2 T.M.FINAP033.00120110905034752 (header portion of the text file needs to validated and removed while exporting to new file) 6301405159509 0000000700 20110504 110.00 USD 0000077191 US Auto Fo US Auto Fo 100000 ABC Fort Worth TX 76137 6301405159509 0009000015 20110726 200.00 USD 0000077897OL00000001Vamsi Vamsi vamsi house 123 CL99AMS06902APECS 20110905154741 2 T.M.FINAP033.00120110905034752 (trailer portion of the file needs to validated and removed while exporting to new file) And while exporting to new file I need to append constant records data in each single row. For instance for the first above record apart of the existing data I need to append 58 constant record data for reach row. 000001(constant) 0000000 (constant) 6301405159509 0000000700 20110504 110.00 USD 0000077191 US Auto Fo US Auto Fo 100000 ABC Fort Worth TX 76137 All constants are fixed values with specifc length. Any help or sample scripts will be greatly appreciated. Thanks Shakee
vb
null
null
null
null
10/27/2011 03:24:58
too localized
VB Script To Delete Header and Footer plus Append Text while exporting to new text file === Hi All VB Script Gurus, I am new to VB script world. I need some help on creating new VB script for the text file changes: I am receiving below sample text file data and needs to modify (append data) and export to new text file. OP01AMS06902APECS 20110905154741 2 T.M.FINAP033.00120110905034752 (header portion of the text file needs to validated and removed while exporting to new file) 6301405159509 0000000700 20110504 110.00 USD 0000077191 US Auto Fo US Auto Fo 100000 ABC Fort Worth TX 76137 6301405159509 0009000015 20110726 200.00 USD 0000077897OL00000001Vamsi Vamsi vamsi house 123 CL99AMS06902APECS 20110905154741 2 T.M.FINAP033.00120110905034752 (trailer portion of the file needs to validated and removed while exporting to new file) And while exporting to new file I need to append constant records data in each single row. For instance for the first above record apart of the existing data I need to append 58 constant record data for reach row. 000001(constant) 0000000 (constant) 6301405159509 0000000700 20110504 110.00 USD 0000077191 US Auto Fo US Auto Fo 100000 ABC Fort Worth TX 76137 All constants are fixed values with specifc length. Any help or sample scripts will be greatly appreciated. Thanks Shakee
3
11,610,237
07/23/2012 09:56:46
1,283,414
03/21/2012 12:58:03
1
1
In GEF bendpoints, how can i retrieve point from first and second dimension?
i have two dimensions, first (width, height) and second(width1, height1). how can i retrieve a Point(x,y) from dimensions???
eclipse-plugin
eclipse-rcp
null
null
null
null
open
In GEF bendpoints, how can i retrieve point from first and second dimension? === i have two dimensions, first (width, height) and second(width1, height1). how can i retrieve a Point(x,y) from dimensions???
0
9,131,744
02/03/2012 16:12:22
1,146,408
01/12/2012 20:44:19
1
0
Is It Possible to Create CSV File with Multiple Tabs in Command Prompt?
I'm looking to create a .csv file that can be opened in Excel that displays 2 tabs. However, the catch is that the script that I write has to be in a batch file (command prompt). I've seen a few ways to do this online, but they're all JAVA programs. I'm not sure about doing this in command prompt Is this even possible?
shell
command-line
csv
batch
null
02/06/2012 18:30:34
off topic
Is It Possible to Create CSV File with Multiple Tabs in Command Prompt? === I'm looking to create a .csv file that can be opened in Excel that displays 2 tabs. However, the catch is that the script that I write has to be in a batch file (command prompt). I've seen a few ways to do this online, but they're all JAVA programs. I'm not sure about doing this in command prompt Is this even possible?
2
2,047,987
01/12/2010 09:50:14
27,840
10/14/2008 13:22:02
79
5
How to write shellextension contextmenuitem in codegear c++ 2010
I'm looking for some examples for writing a shell extension in codegear 2010 (2007 and 2009 would also probably be relevant) so I can rightclick a file in explorer and get the filepath in my vcl program. I have followed [this][1] tutorial but it's from 2001 and I have some trouble to get it to work. With that means I cant get it to call my methods (initialize , QueryContextMenu etc.). [1]: http://edn.embarcadero.com/article/26650
codegear
shell-extensions
contextmenu
c++
c++builder
null
open
How to write shellextension contextmenuitem in codegear c++ 2010 === I'm looking for some examples for writing a shell extension in codegear 2010 (2007 and 2009 would also probably be relevant) so I can rightclick a file in explorer and get the filepath in my vcl program. I have followed [this][1] tutorial but it's from 2001 and I have some trouble to get it to work. With that means I cant get it to call my methods (initialize , QueryContextMenu etc.). [1]: http://edn.embarcadero.com/article/26650
0
8,341,885
12/01/2011 13:05:51
416,552
08/10/2010 19:51:11
251
3
How to add special character's like & > in xml file using java-script
I am generating a xml code using java script, it works file if there is no special character in xml, otherwise it will generate message "invalid xml", I tried to **replace some special character's like **xmlData=xmlData.replaceAll(">","&gt;"); xmlData=xmlData.replaceAll("&","&amp;"); but it doesn't work.** for example: <category label='ARR Builders & Developers'> please reply me if anyone have some solution for this thanks
javascript
xml
null
null
null
null
open
How to add special character's like & > in xml file using java-script === I am generating a xml code using java script, it works file if there is no special character in xml, otherwise it will generate message "invalid xml", I tried to **replace some special character's like **xmlData=xmlData.replaceAll(">","&gt;"); xmlData=xmlData.replaceAll("&","&amp;"); but it doesn't work.** for example: <category label='ARR Builders & Developers'> please reply me if anyone have some solution for this thanks
0
11,200,627
06/26/2012 04:05:14
1,436,488
06/05/2012 04:13:00
1
0
How VPN spliting Done in .Net Using C#
I wants to use a certain browser or an application to send and receive traffic through VPN tunnel while the rest of the traffic is required to travel through the local ISP. Please Help me
c#
.net
vpn
null
null
06/27/2012 11:45:19
off topic
How VPN spliting Done in .Net Using C# === I wants to use a certain browser or an application to send and receive traffic through VPN tunnel while the rest of the traffic is required to travel through the local ISP. Please Help me
2
6,984,871
08/08/2011 15:55:18
884,395
08/08/2011 15:54:59
1
0
Cell colors in a GWT CellTable
I'm using a CellTable and would like to programatically change the background color of certain cells in some situations. I tried it with an Custom Cell as described in the documentation and changed the background color with sb.appendHtmlConstant ("<div style=\"background-color:blue;\">"); sb.append (safeValue); sb.appendHtmlConstant ("</div>"); This basically works, but seems to be quite slow. Is there a better way to do this?
gwt
gwt-2.2-celltable
null
null
null
null
open
Cell colors in a GWT CellTable === I'm using a CellTable and would like to programatically change the background color of certain cells in some situations. I tried it with an Custom Cell as described in the documentation and changed the background color with sb.appendHtmlConstant ("<div style=\"background-color:blue;\">"); sb.append (safeValue); sb.appendHtmlConstant ("</div>"); This basically works, but seems to be quite slow. Is there a better way to do this?
0
8,589,517
12/21/2011 12:03:43
383,731
07/05/2010 13:30:23
76
20
Sequential CSS3 animation
I'm wondering if it is possible to fade in a list of items sequentially using CSS3 only? HTML would be something like this: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> <li>item 9</li> <li>item 10</li> <li>item 11</li> <li>item 12</li> <li>item 13</li> <li>item 14</li> <li>item 15</li> </ul> And when the UL gets the class "fadeout" it would be cool if first "item1" fades out (during 2 seconds) once this is finished fade out the next one("item2") and so on until all items are faded out. I know how to do this using jQuery but it would be nice if this was possible using CSS3 only? Any ideas if this could be possible? Thx!
animation
css3
sequential
null
null
null
open
Sequential CSS3 animation === I'm wondering if it is possible to fade in a list of items sequentially using CSS3 only? HTML would be something like this: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> <li>item 9</li> <li>item 10</li> <li>item 11</li> <li>item 12</li> <li>item 13</li> <li>item 14</li> <li>item 15</li> </ul> And when the UL gets the class "fadeout" it would be cool if first "item1" fades out (during 2 seconds) once this is finished fade out the next one("item2") and so on until all items are faded out. I know how to do this using jQuery but it would be nice if this was possible using CSS3 only? Any ideas if this could be possible? Thx!
0
8,784,855
01/09/2012 06:55:00
281,839
02/26/2010 06:30:28
407
3
can a strong name assambly be used only by a strongly name assambly?
Can a strongly name assembly be used by a strongly name assembly ? I want to know if I signed an asambly as strongly named will it not possible to be used by a simple assambly ? Please guide how to sign a assambly as strongly named ? thanks
c#
.net
visual-studio
visual-studio-2008
null
01/09/2012 10:39:33
not a real question
can a strong name assambly be used only by a strongly name assambly? === Can a strongly name assembly be used by a strongly name assembly ? I want to know if I signed an asambly as strongly named will it not possible to be used by a simple assambly ? Please guide how to sign a assambly as strongly named ? thanks
1
8,548,243
12/17/2011 22:06:37
224,907
12/04/2009 16:31:42
244
21
ARC error: init methods must return a type related to the receiver type [4]
Whats wrong with this code under ARC? I get above error: - (Moment *)initMoment:(BOOL)insert { if (insert) { self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:self.managedObjectContext]; } else { self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:nil]; } return self.moment; }
ios5
initialization
arc
null
null
null
open
ARC error: init methods must return a type related to the receiver type [4] === Whats wrong with this code under ARC? I get above error: - (Moment *)initMoment:(BOOL)insert { if (insert) { self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:self.managedObjectContext]; } else { self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:nil]; } return self.moment; }
0
5,182,954
03/03/2011 15:40:40
512,002
11/18/2010 10:56:50
81
5
Problem with deploying django application on mod_wsgi
I seem to have a problem deploying django with mod_wsgi. In the past I've used mod_python but I want to make the change. I have been using Graham Dumpleton notes here [http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango][1][1], but it still seem to not work. I get a Internal Server Error. `django.wsgi file:` import os import sys sys.path.append('/var/www/html') sys.path.append('/var/www/html/c2duo_crm') os.environ['DJANGO_SETTINGS_MODULE'] = 'c2duo_crm.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() WSGIScriptAlias / /var/www/html/c2duo_crm/apache/django.wsgi `Apache httpd file:` <Directory /var/www/html/c2duo_crm/apache> Order allow,deny Allow from all </Directory> In my apache error log, it says I have this error This is not all of it, but I've got the most important part: [Errno 13] Permission denied: '/.python-eggs' [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] The Python egg cache directory is currently set to: [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] /.python-eggs [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] Perhaps your account does not have write access to this directory? You can [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] change the cache directory by setting the PYTHON_EGG_CACHE environment [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] variable to point to an accessible directory. [1]: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango][1
python
django
apache
deployment
mod-wsgi
11/22/2011 07:59:36
off topic
Problem with deploying django application on mod_wsgi === I seem to have a problem deploying django with mod_wsgi. In the past I've used mod_python but I want to make the change. I have been using Graham Dumpleton notes here [http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango][1][1], but it still seem to not work. I get a Internal Server Error. `django.wsgi file:` import os import sys sys.path.append('/var/www/html') sys.path.append('/var/www/html/c2duo_crm') os.environ['DJANGO_SETTINGS_MODULE'] = 'c2duo_crm.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() WSGIScriptAlias / /var/www/html/c2duo_crm/apache/django.wsgi `Apache httpd file:` <Directory /var/www/html/c2duo_crm/apache> Order allow,deny Allow from all </Directory> In my apache error log, it says I have this error This is not all of it, but I've got the most important part: [Errno 13] Permission denied: '/.python-eggs' [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] The Python egg cache directory is currently set to: [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] /.python-eggs [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] Perhaps your account does not have write access to this directory? You can [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] change the cache directory by setting the PYTHON_EGG_CACHE environment [Thu Mar 03 14:59:25 2011] [error] [client 127.0.0.1] variable to point to an accessible directory. [1]: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango][1
2
4,306,229
11/29/2010 17:21:26
78,716
03/16/2009 18:47:42
880
55
How can a Windows Phone 7 application register for push service updates when the phone starts?
I have a WP7 app and want it to register for push notifications when the phone starts up? Image I have some kind of messaging app, and don't want to force the user to click the tile to sign in and register for push notifications. Are there any events that happen on startup that would give me access to my application? I'm extremely lazy, and if I had a WP7 phone I wouldn't want to have to click on a ton of tiles just to log in if I have saved my credentials in isolated storage and had the ability to 'sign in when the phone starts'.
windows-phone-7
push-notification
null
null
null
null
open
How can a Windows Phone 7 application register for push service updates when the phone starts? === I have a WP7 app and want it to register for push notifications when the phone starts up? Image I have some kind of messaging app, and don't want to force the user to click the tile to sign in and register for push notifications. Are there any events that happen on startup that would give me access to my application? I'm extremely lazy, and if I had a WP7 phone I wouldn't want to have to click on a ton of tiles just to log in if I have saved my credentials in isolated storage and had the ability to 'sign in when the phone starts'.
0
6,508,144
06/28/2011 14:32:56
486,720
10/25/2010 17:26:57
313
1
On algrithms that minimizes maximal load of bins.
There are $n$ bins and $m$ balls. Balls are with different weights, say ball $i$ has weight $w_i$. Is there an algorithm that assigns balls into $x<n$ bins so that maximal load of these bins is minimized.
algorithm
null
null
null
null
06/28/2011 14:43:26
off topic
On algrithms that minimizes maximal load of bins. === There are $n$ bins and $m$ balls. Balls are with different weights, say ball $i$ has weight $w_i$. Is there an algorithm that assigns balls into $x<n$ bins so that maximal load of these bins is minimized.
2
11,157,471
06/22/2012 13:48:15
575,359
01/14/2011 07:31:37
69
0
Recursive Mogrify Script
Another question from a newbie linux scripter. I'm trying to batch mogrify all the files in a folder using this command find -name "*.jpg" -exec mogrify -resize 320 -quality 75 {} \; The command runs but nothing seems to happen. Thanks in advance
linux
mogrify
null
null
null
06/22/2012 23:46:28
too localized
Recursive Mogrify Script === Another question from a newbie linux scripter. I'm trying to batch mogrify all the files in a folder using this command find -name "*.jpg" -exec mogrify -resize 320 -quality 75 {} \; The command runs but nothing seems to happen. Thanks in advance
3
7,852,524
10/21/2011 16:38:39
478,252
10/17/2010 00:21:46
370
26
Get the values of selected checkboxes from an asp checkboxlist in jquery
I am trying to get the selected value (or values) of the checkboxlist. My problem is that I am binding the checkboxlist in c# and it's not rendering with the "Value" attribute as it would if I were to hard code the <asp:ListItem Value=".." .. /> My checkboxlist looks like this: <asp:CheckBoxList runat="sever" ID="cblStuff" DataValueField="myID" DataTextField="myName"></asp:CheckBoxList> So when I try to use jquery and do the follow, it returns only "on" as apposed to "myID". Am I missing something? I was under the impression that is what the DataValueField was for? Here is the js I am using: $("checkboxlist selector").change(function() { $(this).find(":checked").each(function() { alert($(this).val()); }); }); Thanks.
c#
jquery
asp.net
checkboxlist
null
null
open
Get the values of selected checkboxes from an asp checkboxlist in jquery === I am trying to get the selected value (or values) of the checkboxlist. My problem is that I am binding the checkboxlist in c# and it's not rendering with the "Value" attribute as it would if I were to hard code the <asp:ListItem Value=".." .. /> My checkboxlist looks like this: <asp:CheckBoxList runat="sever" ID="cblStuff" DataValueField="myID" DataTextField="myName"></asp:CheckBoxList> So when I try to use jquery and do the follow, it returns only "on" as apposed to "myID". Am I missing something? I was under the impression that is what the DataValueField was for? Here is the js I am using: $("checkboxlist selector").change(function() { $(this).find(":checked").each(function() { alert($(this).val()); }); }); Thanks.
0
11,330,139
07/04/2012 13:32:14
1,501,640
07/04/2012 12:59:30
1
0
Facebook sharing and image size issue
I share link from my website to my Facebook page but the image of the post not resize correct for Fb wall. <br> <br> Image on FB wall: http://tinypic.com/r/24g59pz/6 <br> Image on My website: http://tinypic.com/r/14iiywh/6 <br> <br> Any ideas how I can fix that?
facebook
null
null
null
null
07/05/2012 10:42:33
not a real question
Facebook sharing and image size issue === I share link from my website to my Facebook page but the image of the post not resize correct for Fb wall. <br> <br> Image on FB wall: http://tinypic.com/r/24g59pz/6 <br> Image on My website: http://tinypic.com/r/14iiywh/6 <br> <br> Any ideas how I can fix that?
1
10,912,452
06/06/2012 10:30:12
1,439,488
06/06/2012 10:24:28
1
0
Micro Cloud Foundry Sinatra Hello world application fails to upload - JSON error
I'm just trying to get started with CloudFoundry and am attempting to upload the sample Hello World sinatra app. It fails with a JSON 413 error as follows: *Would you like to deploy from the current directory? [Yn]: y Pushing application 'hello'... Creating Application: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (1009M): OK Error (JSON 413): <html> <head><title>413 Reques...* I think this is something to do with the package being too large, the above output seems to suggest it's 1009M!? Any thoughts on what might be going wrong here? Cheers,
json
cloudfoundry
null
null
null
null
open
Micro Cloud Foundry Sinatra Hello world application fails to upload - JSON error === I'm just trying to get started with CloudFoundry and am attempting to upload the sample Hello World sinatra app. It fails with a JSON 413 error as follows: *Would you like to deploy from the current directory? [Yn]: y Pushing application 'hello'... Creating Application: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (1009M): OK Error (JSON 413): <html> <head><title>413 Reques...* I think this is something to do with the package being too large, the above output seems to suggest it's 1009M!? Any thoughts on what might be going wrong here? Cheers,
0
2,037,737
01/10/2010 17:05:40
217,360
11/23/2009 21:21:48
18
3
What views can i use in an appWidget?
Can anyone tell me what views can I use in an appWidget? Thank you!
android
null
null
null
null
null
open
What views can i use in an appWidget? === Can anyone tell me what views can I use in an appWidget? Thank you!
0
7,489,468
09/20/2011 17:50:25
448,864
07/20/2010 18:48:02
78
1
Android SDK onCreate problem
I think I've gotten myself seriously confused. Up until recently my app was working great. I hadn't changed anything except updated java and android tools. I'm not sure if that caused my problem or what, that's all I can remember changing related to it. Here's the problem I'm running into, which just started. Debug mode (installed app on phone through Eclipse): 1. Tap app icon to open app, onCreate is called 2. Hit home button, state is saved 3. Tap app icon to open app, it resumes, onCreate is not called That worked, my app is happy. Now I export the signed and zip aligned app, remove the app on my phone, install the new one, and repeat these steps: 1. Tap app icon to open app, onCreate is called 2. Hit home button, state is saved 3. Tap app icon to open app, onCreate is called again Ugg, onCreate is called again? Bundle is null, my variables reset. This happens on the emulator too and for other users of the app. I can hold the home button down and switch to it and it continue where it left off but if I tap the icon it calls onCreate every single time. Why is this happening? My app is a single activity.
android
null
null
null
null
null
open
Android SDK onCreate problem === I think I've gotten myself seriously confused. Up until recently my app was working great. I hadn't changed anything except updated java and android tools. I'm not sure if that caused my problem or what, that's all I can remember changing related to it. Here's the problem I'm running into, which just started. Debug mode (installed app on phone through Eclipse): 1. Tap app icon to open app, onCreate is called 2. Hit home button, state is saved 3. Tap app icon to open app, it resumes, onCreate is not called That worked, my app is happy. Now I export the signed and zip aligned app, remove the app on my phone, install the new one, and repeat these steps: 1. Tap app icon to open app, onCreate is called 2. Hit home button, state is saved 3. Tap app icon to open app, onCreate is called again Ugg, onCreate is called again? Bundle is null, my variables reset. This happens on the emulator too and for other users of the app. I can hold the home button down and switch to it and it continue where it left off but if I tap the icon it calls onCreate every single time. Why is this happening? My app is a single activity.
0
7,039,786
08/12/2011 12:01:53
312,896
04/09/2010 14:51:11
6
1
How i can organize my class members, to prevent coping everytime object asked for it
suppose i have class class Pick { public: D3DXVECTOR3 pos; D3DXMATRIX transformation; }; Is that good, or better do as a properties with getters and setters. But code will hardly use these members. So how i can realize functions like [GetTransform][1] and [SetTransform][2]. How Microsoft did it? [1]: http://msdn.microsoft.com/en-us/library/bb174255%28v=vs.85%29.aspx [2]: http://msdn.microsoft.com/en-us/library/bb174258%28v=vs.85%29.aspx
c++
oop
null
null
null
08/12/2011 12:19:46
not a real question
How i can organize my class members, to prevent coping everytime object asked for it === suppose i have class class Pick { public: D3DXVECTOR3 pos; D3DXMATRIX transformation; }; Is that good, or better do as a properties with getters and setters. But code will hardly use these members. So how i can realize functions like [GetTransform][1] and [SetTransform][2]. How Microsoft did it? [1]: http://msdn.microsoft.com/en-us/library/bb174255%28v=vs.85%29.aspx [2]: http://msdn.microsoft.com/en-us/library/bb174258%28v=vs.85%29.aspx
1
4,563,508
12/30/2010 14:46:09
233,428
12/17/2009 00:53:22
367
3
Decode base64 data as array in Python
I'm using this handy Javascript function to decode a base64 string and get an array in return. This is the string: base64_decode_array('6gAAAOsAAADsAAAACAEAAAkBAAAKAQAAJgEAACcBAAAoAQAA') This is what's returned: 234,0,0,0,235,0,0,0,236,0,0,0,8,1,0,0,9,1,0,0,10,1,0,0,38,1,0,0,39,1,0,0,40,1,0,0 The problem is I don't really understand the javascript function: var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(""); var base64inv = {}; for (var i = 0; i < base64chars.length; i++) { base64inv[base64chars[i]] = i; } function base64_decode_array (s) { // remove/ignore any characters not in the base64 characters list // or the pad character -- particularly newlines s = s.replace(new RegExp('[^'+base64chars.join("")+'=]', 'g'), ""); // replace any incoming padding with a zero pad (the 'A' character is zero) var p = (s.charAt(s.length-1) == '=' ? (s.charAt(s.length-2) == '=' ? 'AA' : 'A') : ""); var r = []; s = s.substr(0, s.length - p.length) + p; // increment over the length of this encrypted string, four characters at a time for (var c = 0; c < s.length; c += 4) { // each of these four characters represents a 6-bit index in the base64 characters list // which, when concatenated, will give the 24-bit number for the original 3 characters var n = (base64inv[s.charAt(c)] << 18) + (base64inv[s.charAt(c+1)] << 12) + (base64inv[s.charAt(c+2)] << 6) + base64inv[s.charAt(c+3)]; // split the 24-bit number into the original three 8-bit (ASCII) characters r.push((n >>> 16) & 255); r.push((n >>> 8) & 255); r.push(n & 255); } // remove any zero pad that was added to make this a multiple of 24 bits return r; } What's the function of those "<<<" and ">>>" characters. Or is there a function like this for Python?
javascript
python
arrays
base64
decode
null
open
Decode base64 data as array in Python === I'm using this handy Javascript function to decode a base64 string and get an array in return. This is the string: base64_decode_array('6gAAAOsAAADsAAAACAEAAAkBAAAKAQAAJgEAACcBAAAoAQAA') This is what's returned: 234,0,0,0,235,0,0,0,236,0,0,0,8,1,0,0,9,1,0,0,10,1,0,0,38,1,0,0,39,1,0,0,40,1,0,0 The problem is I don't really understand the javascript function: var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(""); var base64inv = {}; for (var i = 0; i < base64chars.length; i++) { base64inv[base64chars[i]] = i; } function base64_decode_array (s) { // remove/ignore any characters not in the base64 characters list // or the pad character -- particularly newlines s = s.replace(new RegExp('[^'+base64chars.join("")+'=]', 'g'), ""); // replace any incoming padding with a zero pad (the 'A' character is zero) var p = (s.charAt(s.length-1) == '=' ? (s.charAt(s.length-2) == '=' ? 'AA' : 'A') : ""); var r = []; s = s.substr(0, s.length - p.length) + p; // increment over the length of this encrypted string, four characters at a time for (var c = 0; c < s.length; c += 4) { // each of these four characters represents a 6-bit index in the base64 characters list // which, when concatenated, will give the 24-bit number for the original 3 characters var n = (base64inv[s.charAt(c)] << 18) + (base64inv[s.charAt(c+1)] << 12) + (base64inv[s.charAt(c+2)] << 6) + base64inv[s.charAt(c+3)]; // split the 24-bit number into the original three 8-bit (ASCII) characters r.push((n >>> 16) & 255); r.push((n >>> 8) & 255); r.push(n & 255); } // remove any zero pad that was added to make this a multiple of 24 bits return r; } What's the function of those "<<<" and ">>>" characters. Or is there a function like this for Python?
0
4,016,043
10/25/2010 15:21:15
165,059
08/28/2009 19:14:29
3,065
117
High profile MonoTouch apps?
I would like some examples of high profile apps created using MonoTouch. The apps you call home about. The apps that made it to the top 25 lists in their category. Where can I find examples of such applications?
iphone
app-store
monotouch
null
null
10/26/2010 00:28:35
off topic
High profile MonoTouch apps? === I would like some examples of high profile apps created using MonoTouch. The apps you call home about. The apps that made it to the top 25 lists in their category. Where can I find examples of such applications?
2
4,258,329
11/23/2010 16:29:33
431,864
08/26/2010 13:15:11
1
0
Cakephp Routing
I want that users can surf to http://www.yyy.com/xxx for xxx being a parameter. and so with www.yyy.com/xxx/zzz . I have following routing which works fine: Router::connect('/:town', array('controller'=>'places', 'action'=>'index'), array('pass' => array('town'))); Router::connect('/:town/:category', array('controller'=>'places', 'action'=>'index'), array('pass' => array('town', 'category'))); But when I want tot surf to a different controller example www.yyy.com/differentcontroller/add it goes back to the places controller unless I make a routing for it... any ideas?
php
routing
cakephp-1.3
null
null
null
open
Cakephp Routing === I want that users can surf to http://www.yyy.com/xxx for xxx being a parameter. and so with www.yyy.com/xxx/zzz . I have following routing which works fine: Router::connect('/:town', array('controller'=>'places', 'action'=>'index'), array('pass' => array('town'))); Router::connect('/:town/:category', array('controller'=>'places', 'action'=>'index'), array('pass' => array('town', 'category'))); But when I want tot surf to a different controller example www.yyy.com/differentcontroller/add it goes back to the places controller unless I make a routing for it... any ideas?
0
10,438,796
05/03/2012 20:23:23
1,206,542
02/13/2012 10:21:49
55
1
Make input in program input value at website
I want a function in my JavaFX 2.0 program that takes user input and forwards it to a websites textfield, and then get the value the website returns. The website would be a site to check if the warranty for a spesific program is valid. All the user would need to input is reg. ID and maybe program brand. I'm just looking for ideas on how to do this, links or even code would be superb. I suspect it won't require that much code, but hey.. i've been surprised before! Thanks! :)
java
input
website
null
null
null
open
Make input in program input value at website === I want a function in my JavaFX 2.0 program that takes user input and forwards it to a websites textfield, and then get the value the website returns. The website would be a site to check if the warranty for a spesific program is valid. All the user would need to input is reg. ID and maybe program brand. I'm just looking for ideas on how to do this, links or even code would be superb. I suspect it won't require that much code, but hey.. i've been surprised before! Thanks! :)
0
560,663
02/18/2009 11:23:33
25,804
10/07/2008 12:52:38
79
11
Include an attribute of an unrelated element in an XPath
I have the following XML file: <phonebook> <departments> <department id="1" parent="" title="Rabit Hole" address="" email="" index=""/> <department id="2" parent="" title="Big Pond" address="" email="" index=""/> </departments> <employees> <employee id="1" fname="Daffy" lname="Duck" title="Admin" email="daffy.duck@example.com" department="2" room="" /> <employee id="2" fname="Bugs" lname="Bunny" title="Programmer" email="bugs.bunny@example.com" department="1" room="" /> </employees> </phonebook> When displaying it, I want to show the contact details for an employee as well as the title of the department where he works. Here's what I've got in the template: <xsl:for-each select="phonebook/employees/employee"> <xsl:sort select="@lname" /> <tr> <td> <span class="lname"><xsl:value-of select="@lname"/></span> <xsl:text> </xsl:text> <span class="fname"><xsl:value-of select="@fname"/></span> </td> <td><xsl:value-of select="@title"/></td> <td> <xsl:value-of select="/phonebook/departments/department[@id='{@department}']/@title"/> </td> <td><a href="mailto:{@email}"><xsl:value-of select="@email"/></a></td> </tr> </xsl:for-each> The problem is that the following rule doesn't seem to work: <xsl:value-of select="/phonebook/departments/department[@id='{@department}']/@title"/> I guess this is because the XSLT engine looks for the `department` property in the `department` element, and not in the `employee` element. However, I don't have an idea how to fix it. Could anyone give me a hint on that?
xslt
xpath
null
null
null
null
open
Include an attribute of an unrelated element in an XPath === I have the following XML file: <phonebook> <departments> <department id="1" parent="" title="Rabit Hole" address="" email="" index=""/> <department id="2" parent="" title="Big Pond" address="" email="" index=""/> </departments> <employees> <employee id="1" fname="Daffy" lname="Duck" title="Admin" email="daffy.duck@example.com" department="2" room="" /> <employee id="2" fname="Bugs" lname="Bunny" title="Programmer" email="bugs.bunny@example.com" department="1" room="" /> </employees> </phonebook> When displaying it, I want to show the contact details for an employee as well as the title of the department where he works. Here's what I've got in the template: <xsl:for-each select="phonebook/employees/employee"> <xsl:sort select="@lname" /> <tr> <td> <span class="lname"><xsl:value-of select="@lname"/></span> <xsl:text> </xsl:text> <span class="fname"><xsl:value-of select="@fname"/></span> </td> <td><xsl:value-of select="@title"/></td> <td> <xsl:value-of select="/phonebook/departments/department[@id='{@department}']/@title"/> </td> <td><a href="mailto:{@email}"><xsl:value-of select="@email"/></a></td> </tr> </xsl:for-each> The problem is that the following rule doesn't seem to work: <xsl:value-of select="/phonebook/departments/department[@id='{@department}']/@title"/> I guess this is because the XSLT engine looks for the `department` property in the `department` element, and not in the `employee` element. However, I don't have an idea how to fix it. Could anyone give me a hint on that?
0
7,733,587
10/11/2011 23:09:39
645,924
11/27/2010 20:01:40
470
3
can you create one div to flow over others like ijn the image bellow
black is the browser window in the image bellow. I want to accomplish the image in the right I have a div which is centered (blue) and has a fixed width I have a div which is inside (red) I want the red div to span from one side of the screen to the other while still aligning all else in the center. How should I do this? Should I break it in 3 divs(first fixed and centered, the second to span all width, the third like the first) ![enter image description here][1] [1]: http://i.stack.imgur.com/cZP0U.png
html
div
null
null
null
null
open
can you create one div to flow over others like ijn the image bellow === black is the browser window in the image bellow. I want to accomplish the image in the right I have a div which is centered (blue) and has a fixed width I have a div which is inside (red) I want the red div to span from one side of the screen to the other while still aligning all else in the center. How should I do this? Should I break it in 3 divs(first fixed and centered, the second to span all width, the third like the first) ![enter image description here][1] [1]: http://i.stack.imgur.com/cZP0U.png
0
6,880,908
07/30/2011 03:31:26
535,103
12/08/2010 14:28:08
126
0
Recommendation for ATI OpenCL GPGPU card
I first got into GPGPU with my (now aging) NVidia 9800GT 512MB via CUDA. It seems these days my GPU just doesn't cut it and I've heard that ATI blows NVidia out of the water for GPGPU these days (correct me if I'm wrong). I'm specifically interested in OpenCL, as opposed to CUDA or StreamSDK, though some info on whether either of these are still worth pursuing would be nice. My budget is around 150 GBP plus/minus 50 GBP. I'm a little out of the loop on which GPUs are best for scientific computing (specifically fluid simulation and 3D medical image processing). I'd also be interested to hear any suggestions on games that make use of GPGPU capabilities, but that's a minor issue next to the potential for scientific computing. I'm also a little lost when it comes to evaluating the pros/cons of memory speed vs. clock speed vs. memory capacity, etc, so any info with regard to these more technical aspects would be most appreciated. Cheers.
cuda
opencl
gpgpu
nvidia
ati
07/30/2011 11:36:46
not constructive
Recommendation for ATI OpenCL GPGPU card === I first got into GPGPU with my (now aging) NVidia 9800GT 512MB via CUDA. It seems these days my GPU just doesn't cut it and I've heard that ATI blows NVidia out of the water for GPGPU these days (correct me if I'm wrong). I'm specifically interested in OpenCL, as opposed to CUDA or StreamSDK, though some info on whether either of these are still worth pursuing would be nice. My budget is around 150 GBP plus/minus 50 GBP. I'm a little out of the loop on which GPUs are best for scientific computing (specifically fluid simulation and 3D medical image processing). I'd also be interested to hear any suggestions on games that make use of GPGPU capabilities, but that's a minor issue next to the potential for scientific computing. I'm also a little lost when it comes to evaluating the pros/cons of memory speed vs. clock speed vs. memory capacity, etc, so any info with regard to these more technical aspects would be most appreciated. Cheers.
4
576,400
02/23/2009 02:57:36
44,996
12/10/2008 14:10:29
387
8
What's the best way to diff two database backup files with MS Sql Server 2005?
I have two database backup files. I would like to know if there is any difference between the two. I could go row by row, field by field and do a diff (I'm not looking for differences in schema but rather data, although I expect the schema to remain the same). Can I run some sort of checksum on the files, or do I have to go through the data itself to be 100% certain?
sql-server
sql-server-2005
null
null
null
null
open
What's the best way to diff two database backup files with MS Sql Server 2005? === I have two database backup files. I would like to know if there is any difference between the two. I could go row by row, field by field and do a diff (I'm not looking for differences in schema but rather data, although I expect the schema to remain the same). Can I run some sort of checksum on the files, or do I have to go through the data itself to be 100% certain?
0
10,461,033
05/05/2012 10:36:29
1,362,858
04/28/2012 12:27:25
3
0
mysql_real_escape_string replace with Regex Code?
i need the RegEx Code for "PAWN". You can imagine that, i need a Code which i can use with preg_replace, too. *( if you dont know what pawn is )* Also what i use, is worse... So, my Code is. $text = preg_replace('/([\\\\\|\'|"])/', '\\\$1', $text); Is this right? This Code would replace the in PHP Documentation given Charakters etc. But it replace all \ :/ \n etc., too! **Have you a Code, which only replaces the following Charakters?** http://de3.php.net/manual/de/function.mysql-real-escape-string.php \x00, \n, \r, \, ', " und \x1a
php
regex
escaping
preg-replace
mysql-real-escape-string
05/16/2012 12:34:08
not a real question
mysql_real_escape_string replace with Regex Code? === i need the RegEx Code for "PAWN". You can imagine that, i need a Code which i can use with preg_replace, too. *( if you dont know what pawn is )* Also what i use, is worse... So, my Code is. $text = preg_replace('/([\\\\\|\'|"])/', '\\\$1', $text); Is this right? This Code would replace the in PHP Documentation given Charakters etc. But it replace all \ :/ \n etc., too! **Have you a Code, which only replaces the following Charakters?** http://de3.php.net/manual/de/function.mysql-real-escape-string.php \x00, \n, \r, \, ', " und \x1a
1
7,957,859
10/31/2011 18:15:23
1,022,460
10/31/2011 18:05:40
1
0
How to make a scrollbar, slider bar, something like that (android)
I am not good at English. It's probably why I can't get the answer in Google. What I want is just an horizontal bar for selecting number in a range. But Google keeps showing me the scrollbar of view, layout etc. Is there any tutorial? Am I searching with a wrong keyword?
android
scrollbar
null
null
null
11/02/2011 05:53:15
too localized
How to make a scrollbar, slider bar, something like that (android) === I am not good at English. It's probably why I can't get the answer in Google. What I want is just an horizontal bar for selecting number in a range. But Google keeps showing me the scrollbar of view, layout etc. Is there any tutorial? Am I searching with a wrong keyword?
3
7,332,396
09/07/2011 10:31:42
65,403
02/12/2009 04:47:24
323
3
How to use BackgroundWorker in Linq?
do you have any suggestion or idea how to use BackGroundWorker in Linq to Sql to retrieve data from a database ? Thanks so much for your attention, Cheers
linq-to-sql
c#-4.0
null
null
null
09/07/2011 13:12:12
not a real question
How to use BackgroundWorker in Linq? === do you have any suggestion or idea how to use BackGroundWorker in Linq to Sql to retrieve data from a database ? Thanks so much for your attention, Cheers
1
9,340,000
02/18/2012 09:11:25
990,772
10/12/2011 05:13:36
94
6
How to specify and make use of header files for verilog language while using exuberant ctags with emacs
I have recently started using exuberant ctags and emacs for verilog & system verilog coding and code browsing. I currently generate the tags using the command ctags -e -R --tag-relative=yes --langmap=verilog:.v.vh.sv.svh My code contains a lot of `define macros which are all specified in certain header files with extension ".vh" & ".svh". For e.g. a header file named **foo.vh** has the following code `define WIDTH_ADDRESS 32; and a file **top.v** invokes the macro as follows input [`WIDTH_ADDRESS - 1 : 0] InAddress; While browsing the **top.v** file using emacs, is there any way by which I can jump directly to to the macro definition in the **foo.vh** file? I have been using `M-x tags-search <RET> WIDTH_ADDRESS <RET>` for sometime now but it jumps to quite a few other instances of `WIDTH_ADDRESS in other files before reaching the foo.vh file. After some research I did see an option to specify header files using `-h` option with ctags during tags generation. However I could not get it to work and I guess there was some syntactical error from my part. First of all are there any notable benefits of specifying a header file using `-h` option? If so, what is the correct syntax to specify header files? Also can I specify emacs to look into these header files first (files with extension ".vh" &".svh") before parsing other files (with extension ".v" & ".sv")
emacs
verilog
ctags
system-verilog
exuberant-ctags
null
open
How to specify and make use of header files for verilog language while using exuberant ctags with emacs === I have recently started using exuberant ctags and emacs for verilog & system verilog coding and code browsing. I currently generate the tags using the command ctags -e -R --tag-relative=yes --langmap=verilog:.v.vh.sv.svh My code contains a lot of `define macros which are all specified in certain header files with extension ".vh" & ".svh". For e.g. a header file named **foo.vh** has the following code `define WIDTH_ADDRESS 32; and a file **top.v** invokes the macro as follows input [`WIDTH_ADDRESS - 1 : 0] InAddress; While browsing the **top.v** file using emacs, is there any way by which I can jump directly to to the macro definition in the **foo.vh** file? I have been using `M-x tags-search <RET> WIDTH_ADDRESS <RET>` for sometime now but it jumps to quite a few other instances of `WIDTH_ADDRESS in other files before reaching the foo.vh file. After some research I did see an option to specify header files using `-h` option with ctags during tags generation. However I could not get it to work and I guess there was some syntactical error from my part. First of all are there any notable benefits of specifying a header file using `-h` option? If so, what is the correct syntax to specify header files? Also can I specify emacs to look into these header files first (files with extension ".vh" &".svh") before parsing other files (with extension ".v" & ".sv")
0
557,229
02/17/2009 15:03:33
54,964
01/14/2009 11:38:17
508
5
Conditional bash search?
How can I make such a conditional search in Bash like in Google "python" imag The word **python** must be in the search, while the word **imag** aims to match at least image and imaging. I want to search a python module for images, perhaps in apt-get.
search
bash
null
null
null
null
open
Conditional bash search? === How can I make such a conditional search in Bash like in Google "python" imag The word **python** must be in the search, while the word **imag** aims to match at least image and imaging. I want to search a python module for images, perhaps in apt-get.
0
7,974,959
11/02/2011 01:49:32
1,021,270
10/31/2011 01:18:22
11
0
Python: create dict from list and auto-gen/increment the keys (list is the actual key values)?
i've searched pretty hard and cant find a question that exactly pertains to what i want to.. I have a file called "words" that has about 1000 lines of random A-Z sorted words... 10th 1st 2nd 3rd 4th 5th 6th 7th 8th 9th a AAA AAAS Aarhus Aaron AAU ABA Ababa aback abacus abalone abandon abase abash abate abater abbas abbe abbey abbot Abbott abbreviate abc abdicate abdomen abdominal abduct Abe abed Abel Abelian I am trying to load this file into a dictionary, where using the word are the key values and the keys are actually auto-gen/auto-incremented for each word e.g {0:10th, 1:1st, 2:2nd} ...etc..etc... below is the code i've hobbled together so far, it seems to *sort of* works but its only showing me the last entry in the file as the only dict pair element f3data = open('words') mydict = {} for line in f3data: print line.strip() cmyline = line.split() key = +1 mydict [key] = cmyline print mydict
python
file-io
dictionary
null
null
null
open
Python: create dict from list and auto-gen/increment the keys (list is the actual key values)? === i've searched pretty hard and cant find a question that exactly pertains to what i want to.. I have a file called "words" that has about 1000 lines of random A-Z sorted words... 10th 1st 2nd 3rd 4th 5th 6th 7th 8th 9th a AAA AAAS Aarhus Aaron AAU ABA Ababa aback abacus abalone abandon abase abash abate abater abbas abbe abbey abbot Abbott abbreviate abc abdicate abdomen abdominal abduct Abe abed Abel Abelian I am trying to load this file into a dictionary, where using the word are the key values and the keys are actually auto-gen/auto-incremented for each word e.g {0:10th, 1:1st, 2:2nd} ...etc..etc... below is the code i've hobbled together so far, it seems to *sort of* works but its only showing me the last entry in the file as the only dict pair element f3data = open('words') mydict = {} for line in f3data: print line.strip() cmyline = line.split() key = +1 mydict [key] = cmyline print mydict
0
9,064,842
01/30/2012 13:47:17
146,366
07/28/2009 12:14:46
535
26
Best SVN repository creation software?
We were using Indefero for a while, but it wasn't doing the trick. I just need an online management tool with which I can create repos and users, and assign them, so I can check them out on my local machine. How does everyone else do it?
svn
null
null
null
null
01/31/2012 04:41:30
not constructive
Best SVN repository creation software? === We were using Indefero for a while, but it wasn't doing the trick. I just need an online management tool with which I can create repos and users, and assign them, so I can check them out on my local machine. How does everyone else do it?
4
10,689,684
05/21/2012 17:22:03
1,408,429
05/21/2012 17:03:12
1
0
RandomLine + imagettftext
Do you guys know how to cut text in RandomLine? This is for facebook application. I have: In the powod.txt I have: Najkrótszy dowcip informatyczny?<br> Winrar.rar In main php file: $reason = RandomLine("powod.txt"); imagettftext( $canvas, 20, 8, 160, 280, $black, $font, $reason ); <br> is not working in text file. Do you know how to fix it?
php
null
null
null
null
null
open
RandomLine + imagettftext === Do you guys know how to cut text in RandomLine? This is for facebook application. I have: In the powod.txt I have: Najkrótszy dowcip informatyczny?<br> Winrar.rar In main php file: $reason = RandomLine("powod.txt"); imagettftext( $canvas, 20, 8, 160, 280, $black, $font, $reason ); <br> is not working in text file. Do you know how to fix it?
0
9,942,016
03/30/2012 11:25:05
1,197,249
02/08/2012 13:13:30
310
0
Using AtomicInteger safely to check first
How can I do "check-then-act" in an `AtomicInteger` variable? I.e. what is the most safe/best way to check the value of such a variable first and inc/dec depending on result? E.g. (in high level) `if(count < VALUE) count++;` //atomically using `AtomicInteger`
java
multithreading
concurrency
atomic
null
null
open
Using AtomicInteger safely to check first === How can I do "check-then-act" in an `AtomicInteger` variable? I.e. what is the most safe/best way to check the value of such a variable first and inc/dec depending on result? E.g. (in high level) `if(count < VALUE) count++;` //atomically using `AtomicInteger`
0
10,942,255
06/08/2012 02:08:10
1,004,573
10/20/2011 06:14:46
20
0
Tiny MCE Multiple Instances Submit Trigger Save Problems
Hi guys I have a problem with Tiny MCE's plugin at the moment. I have a form where I have multiple instances of Tiny MCE Editors and I need to save the text that is in it. Originally, what happened was that my form would not submit the data in the TinyMCE editors. I have searched up forums and one solution suggested was that I perform tinyMCE.triggerSave() on submit. I have put that code as in below, however, it still does not do what I expected to do, that is taking what I entered in the data and submitting those with the form submisson. $('form').live('submit', function(e){ // a tiny MCE field exists if($('.tinymce').get(0)){ alert('Triggering Save....'); tinyMCE.triggerSave(); alert('Triggered Save! :)'); } }); My question is what other solutions are out there to solve this problem, and If it can't be solved by tinyMCE, is there another editor plugin that will support multiple instances and submit those values on submit. Any answers will be appreciated. Thanks guys.
javascript
tinymce
form-submit
multiple-instances
null
null
open
Tiny MCE Multiple Instances Submit Trigger Save Problems === Hi guys I have a problem with Tiny MCE's plugin at the moment. I have a form where I have multiple instances of Tiny MCE Editors and I need to save the text that is in it. Originally, what happened was that my form would not submit the data in the TinyMCE editors. I have searched up forums and one solution suggested was that I perform tinyMCE.triggerSave() on submit. I have put that code as in below, however, it still does not do what I expected to do, that is taking what I entered in the data and submitting those with the form submisson. $('form').live('submit', function(e){ // a tiny MCE field exists if($('.tinymce').get(0)){ alert('Triggering Save....'); tinyMCE.triggerSave(); alert('Triggered Save! :)'); } }); My question is what other solutions are out there to solve this problem, and If it can't be solved by tinyMCE, is there another editor plugin that will support multiple instances and submit those values on submit. Any answers will be appreciated. Thanks guys.
0
1,749,287
11/17/2009 14:32:00
136,281
07/10/2009 13:29:55
14
0
how linux run different microprocessors
how linux run different processors, linux kernal compiled using corresponing compilers,so it run different micprocessors like intel, Sun sparc,MIPS?
linux
null
null
null
null
11/17/2009 14:36:19
not a real question
how linux run different microprocessors === how linux run different processors, linux kernal compiled using corresponing compilers,so it run different micprocessors like intel, Sun sparc,MIPS?
1
419,776
01/07/2009 09:53:01
45,603
08/25/2008 09:52:34
920
43
Modal operation using IMessageFilter and DoEvents
This is a Windows Forms application. I have a function which captures some mouse events modally till a condition is met. For example, I would like to wait for the user to select a point in the window's client area (or optionally cancel the operation using the Escape key) before the function returns. I am using the following structure: Application::AddMessageFilter(someFilter); while(someFilter->HasUserSelectedAPoint_Or_HitEscapeKey()){ Application::DoEvents(); } Application::RemoveMessageFilter(someFilter); This works quite nicely except for taking up nearly 100% CPU usage when control enters the while loop. What is the right way to use `IMessageFilter`? How do I surrender control to the OS till a message is received? Any `GetMessage` equivalent in the managed world?
winforms
winapi
windows
gui
null
null
open
Modal operation using IMessageFilter and DoEvents === This is a Windows Forms application. I have a function which captures some mouse events modally till a condition is met. For example, I would like to wait for the user to select a point in the window's client area (or optionally cancel the operation using the Escape key) before the function returns. I am using the following structure: Application::AddMessageFilter(someFilter); while(someFilter->HasUserSelectedAPoint_Or_HitEscapeKey()){ Application::DoEvents(); } Application::RemoveMessageFilter(someFilter); This works quite nicely except for taking up nearly 100% CPU usage when control enters the while loop. What is the right way to use `IMessageFilter`? How do I surrender control to the OS till a message is received? Any `GetMessage` equivalent in the managed world?
0
9,519,663
03/01/2012 16:08:45
1,136,594
01/08/2012 01:08:48
52
0
javascript dateTime - the same format as server
I have an ajax call, which returns datetime. Javascript displays it using client timezone. I not need in any client timezone, I want to show datetime the same as server return. Is it possible? I get date via: var d = eval('new' + date.replace(/\//g, ' '));
javascript
datetime
null
null
null
null
open
javascript dateTime - the same format as server === I have an ajax call, which returns datetime. Javascript displays it using client timezone. I not need in any client timezone, I want to show datetime the same as server return. Is it possible? I get date via: var d = eval('new' + date.replace(/\//g, ' '));
0
10,593,281
05/15/2012 01:58:06
775,602
05/30/2011 01:00:50
97
6
Html 5 vs other technologies
I have been reading a lot of stuff about HTML 5 recently. Something still looks very fuzzy to me and I hope somebody can help me understand it better. Is HTML 5 for the "technology" to create the UI only? If I need to create an application to access bank accounts, how is it possible that HTML 5 will replace all other technologies? I mean there must be some kind of web service that the application has to use to access the data on the server and I can't see how that piece can be done with HTML 5.
html5
null
null
null
null
05/18/2012 17:15:30
not constructive
Html 5 vs other technologies === I have been reading a lot of stuff about HTML 5 recently. Something still looks very fuzzy to me and I hope somebody can help me understand it better. Is HTML 5 for the "technology" to create the UI only? If I need to create an application to access bank accounts, how is it possible that HTML 5 will replace all other technologies? I mean there must be some kind of web service that the application has to use to access the data on the server and I can't see how that piece can be done with HTML 5.
4
11,709,753
07/29/2012 13:49:53
1,494,342
07/01/2012 14:12:11
1
0
how to save an NSInteger in NSUserDefaults
I am trying to save an NSInteger (label) into NSUserDefaults but I have not found a way to do this is it even possibel Saving the data [[NSUserDefaults standardUserDefaults] setInteger:label forKey:@"key1"]; Retrieving the data - (void)viewDidLoad { label = [[NSUserDefaults standardUserDefaults] integerForKey:@"key1"]; [super viewDidLoad];
c++
objective-c
xcode
nsuserdefaults
nsinteger
07/30/2012 14:37:14
not a real question
how to save an NSInteger in NSUserDefaults === I am trying to save an NSInteger (label) into NSUserDefaults but I have not found a way to do this is it even possibel Saving the data [[NSUserDefaults standardUserDefaults] setInteger:label forKey:@"key1"]; Retrieving the data - (void)viewDidLoad { label = [[NSUserDefaults standardUserDefaults] integerForKey:@"key1"]; [super viewDidLoad];
1
9,198,866
02/08/2012 17:59:37
660,668
03/15/2011 13:41:36
68
1
Merging data between 2 separate Oracle databases
I've got two separate, unconnected and unconnectable Oracle databases. I need to get information from one to the other as quickly and painlessly as possible. Typically what I've done up until now when in this situation is create a staging area for the data that needs to be imported (essentially a temporary table just for storing the data until I'm done merging). I copy _all_ of the data that _might_ be needed from the source to that staging area. Then I merge the data as I would if the two tables were connected, meaning of course that I can filter out whatever data I don't need at that time. Here's the problem in my current case. The source table is _extremely_ large and entirely _un-indexed_ (something over which I have no control, ugh). That means it takes **forever** to get the necessary data if I don't filter it in some way. In addition the destination table really only needs a relatively small subset of the data to do what it needs to do, maybe ten thousand or so distinct rows at a time. In this case I don't want to copy _all_ of the data that _might_ be needed. I just want to copy over the _exact_ data that will be needed, or as close to that as possible. **tl:dr version** **Exactly how do I limit my select on the source table based on what I need in the destination table if they can't communicate with each other?** For example, I might select ID's for the data that is needed in the destination and build the query for the source table based on that. However, that might result in a query with many thousands of OR clauses in it: SELECT x, y FROM z WHERE (ID = 1 OR ID = 2 ... OR ID = 10000 OR ID = 10001...) Or something like that. Is there a better way of doing it?
database
oracle
query
null
null
null
open
Merging data between 2 separate Oracle databases === I've got two separate, unconnected and unconnectable Oracle databases. I need to get information from one to the other as quickly and painlessly as possible. Typically what I've done up until now when in this situation is create a staging area for the data that needs to be imported (essentially a temporary table just for storing the data until I'm done merging). I copy _all_ of the data that _might_ be needed from the source to that staging area. Then I merge the data as I would if the two tables were connected, meaning of course that I can filter out whatever data I don't need at that time. Here's the problem in my current case. The source table is _extremely_ large and entirely _un-indexed_ (something over which I have no control, ugh). That means it takes **forever** to get the necessary data if I don't filter it in some way. In addition the destination table really only needs a relatively small subset of the data to do what it needs to do, maybe ten thousand or so distinct rows at a time. In this case I don't want to copy _all_ of the data that _might_ be needed. I just want to copy over the _exact_ data that will be needed, or as close to that as possible. **tl:dr version** **Exactly how do I limit my select on the source table based on what I need in the destination table if they can't communicate with each other?** For example, I might select ID's for the data that is needed in the destination and build the query for the source table based on that. However, that might result in a query with many thousands of OR clauses in it: SELECT x, y FROM z WHERE (ID = 1 OR ID = 2 ... OR ID = 10000 OR ID = 10001...) Or something like that. Is there a better way of doing it?
0
7,939,739
10/29/2011 15:16:51
871,202
07/31/2011 02:04:31
293
2
What really is a PNG?
So I asked this question earlier: http://stackoverflow.com/questions/7937068/css-box-shadow-not-truly-transparent And I realize that I do not really know what a .png file is. .bmps are just uncompressed bitmaps, .jpgs are bitmaps compressed using the special jpeg algorithm, and I thought .pngs were just bitmaps compressed losslessly using some special png algorithm. However, it turns out .pngs can be indexed colors like gifs (still losslessly?) and Adobe Fireworks can make special "Fireworks PNG"s which are editable, letting the user drag and drop stuff around the image a.l.a. MS Word document but still allowing them to be readable by "standard" image processing stuff (browsers, paint.net, etc.) as a normal .png. What gives? Clearly there is way more to the .png format than just losslessly compressed bitmaps.
image
compression
png
format
fireworks
11/12/2011 19:04:15
off topic
What really is a PNG? === So I asked this question earlier: http://stackoverflow.com/questions/7937068/css-box-shadow-not-truly-transparent And I realize that I do not really know what a .png file is. .bmps are just uncompressed bitmaps, .jpgs are bitmaps compressed using the special jpeg algorithm, and I thought .pngs were just bitmaps compressed losslessly using some special png algorithm. However, it turns out .pngs can be indexed colors like gifs (still losslessly?) and Adobe Fireworks can make special "Fireworks PNG"s which are editable, letting the user drag and drop stuff around the image a.l.a. MS Word document but still allowing them to be readable by "standard" image processing stuff (browsers, paint.net, etc.) as a normal .png. What gives? Clearly there is way more to the .png format than just losslessly compressed bitmaps.
2
4,653,118
01/11/2011 00:44:10
460,025
09/27/2010 23:07:53
1
0
hidden iframe issue with iphone safari
Safari iphone/ipad doesn't honor 0px for width and height on an iframe and puts a big one. Has anyone seen that or found a fix other than setting display to none since 0px seems to work on all the browsers.
javascript
html
null
null
null
null
open
hidden iframe issue with iphone safari === Safari iphone/ipad doesn't honor 0px for width and height on an iframe and puts a big one. Has anyone seen that or found a fix other than setting display to none since 0px seems to work on all the browsers.
0
4,794,520
01/25/2011 14:19:34
588,855
08/06/2010 17:52:56
142
1
Multiple inheritance in C++
As you know, C++ allows `multiple inheritance`. But, would it be a good programming approach to use multiple inheritance or it should be avoided? Thanks.
c++
multiple-inheritance
null
null
null
01/25/2011 14:22:50
not a real question
Multiple inheritance in C++ === As you know, C++ allows `multiple inheritance`. But, would it be a good programming approach to use multiple inheritance or it should be avoided? Thanks.
1
10,608,886
05/15/2012 21:07:14
359,862
06/06/2010 19:55:32
3,852
47
2 simple regex questions
**Question 1.** String matchedKey = "sessions.0.something.else"; Pattern newP = Pattern.compile("sessions\\.([^\\.]+)(\\..+)"); m = newP.matcher(matchedKey); System.out.println(m.group(1)); // has nothing. Why? sessions\\. // word "sessions" followed by . ([^\\.]+) // followed by something that is not a literal . at least once (\\..+) // followed by literal . and anything at least once I would have expected for m.group(1) to be 0 **Question 2** String mask = "sessions.{env}"; String maskRegex = mask.replace(".", "\\\\.").replace("env", "(.+)") .replace("{", "").replace("}", ""); // produces mask "sessions\\.(.+))" When used as Pattern newP = Pattern.compile("sessions\\.(.+))"); // matches matchedKey (above) Pattern newP = Pattern.compile(maskRegex); // does not match matchedKey (above) Why is that?
java
regex
null
null
null
null
open
2 simple regex questions === **Question 1.** String matchedKey = "sessions.0.something.else"; Pattern newP = Pattern.compile("sessions\\.([^\\.]+)(\\..+)"); m = newP.matcher(matchedKey); System.out.println(m.group(1)); // has nothing. Why? sessions\\. // word "sessions" followed by . ([^\\.]+) // followed by something that is not a literal . at least once (\\..+) // followed by literal . and anything at least once I would have expected for m.group(1) to be 0 **Question 2** String mask = "sessions.{env}"; String maskRegex = mask.replace(".", "\\\\.").replace("env", "(.+)") .replace("{", "").replace("}", ""); // produces mask "sessions\\.(.+))" When used as Pattern newP = Pattern.compile("sessions\\.(.+))"); // matches matchedKey (above) Pattern newP = Pattern.compile(maskRegex); // does not match matchedKey (above) Why is that?
0
9,637,702
03/09/2012 16:38:39
1,259,730
03/09/2012 16:28:47
1
0
how do i send variables from form to form in C#
i need help. how do i send variables from form1 to form2. i need to send two strings and one int from form1 to form2 and then use them in three separate textboxses im a biginner so keep it simple thanks for the help.
c#
forms
null
null
null
03/10/2012 17:42:04
not a real question
how do i send variables from form to form in C# === i need help. how do i send variables from form1 to form2. i need to send two strings and one int from form1 to form2 and then use them in three separate textboxses im a biginner so keep it simple thanks for the help.
1
5,119,781
02/25/2011 16:28:46
472,677
10/11/2010 20:50:32
1
1
Audio Stream URLs and Problem Solving Stream URLs
I thought I would share what I went through. This is not a question. We solved a problem. I’m sure old media server hounds know about this. I didn’t. I hope this saves you time in the future. Problem: My customer’s Shoutcast listing went away but their provider didn’t. (Shoutcast has listings for many stations as a convenience. My customer’s used to be: http: //yp.shoutcast.com/sbin/tunein-station.pls?id=3012xxx and then it went away! Their station didn’t. We were left with several URLs provided us by the station and none of them played via our player. Within each .pls, .ram file, the same URL was listed (see note) - something like this: http: //74.53.186.162:9082/ How did we solve the problem? On the Shoutcast console page above, there is a listen link. It refers to a URL with a .pls extension. It also shows the sample rate, number of current listeners, etc. The URL worked. What made this interesting is that file located at that URL actually was a .pls text file with the original URL (something like http: //74.53.186.162:9082/) ! What did I learn? 1. Shoutcast servers know what kind of client is accessing their data. I would assume the same to be true of IceCast servers. How did I know? The circular URL reference. This means that your player parses text files first much like your browser looks at the mime type. 2. Media player classes that you use in code can be really dumb. They’re sensitive to mime types, bit rates, extension names, etc. 3. If I have the .pls or other media file, I can use them locally. 4. Hard coded IP addresses are just as bad as they ever were. Unfortunately, developers don’t have much control over this. Note: Audio Streams with .pls, .ram, etc are text files that have URLs in them to the actual stream. The text file has other meta data as well. If you take the raw URL from the txt file and launch it, you might get a Shoutcast Server interface that gives you stream information that your player might use. (When viewing a radio station’s website, you can sometimes find the stream URL in the player’s launch parms. Sometimes they can be different.)
java
android
null
null
null
06/27/2011 17:13:22
not a real question
Audio Stream URLs and Problem Solving Stream URLs === I thought I would share what I went through. This is not a question. We solved a problem. I’m sure old media server hounds know about this. I didn’t. I hope this saves you time in the future. Problem: My customer’s Shoutcast listing went away but their provider didn’t. (Shoutcast has listings for many stations as a convenience. My customer’s used to be: http: //yp.shoutcast.com/sbin/tunein-station.pls?id=3012xxx and then it went away! Their station didn’t. We were left with several URLs provided us by the station and none of them played via our player. Within each .pls, .ram file, the same URL was listed (see note) - something like this: http: //74.53.186.162:9082/ How did we solve the problem? On the Shoutcast console page above, there is a listen link. It refers to a URL with a .pls extension. It also shows the sample rate, number of current listeners, etc. The URL worked. What made this interesting is that file located at that URL actually was a .pls text file with the original URL (something like http: //74.53.186.162:9082/) ! What did I learn? 1. Shoutcast servers know what kind of client is accessing their data. I would assume the same to be true of IceCast servers. How did I know? The circular URL reference. This means that your player parses text files first much like your browser looks at the mime type. 2. Media player classes that you use in code can be really dumb. They’re sensitive to mime types, bit rates, extension names, etc. 3. If I have the .pls or other media file, I can use them locally. 4. Hard coded IP addresses are just as bad as they ever were. Unfortunately, developers don’t have much control over this. Note: Audio Streams with .pls, .ram, etc are text files that have URLs in them to the actual stream. The text file has other meta data as well. If you take the raw URL from the txt file and launch it, you might get a Shoutcast Server interface that gives you stream information that your player might use. (When viewing a radio station’s website, you can sometimes find the stream URL in the player’s launch parms. Sometimes they can be different.)
1
8,015,535
11/04/2011 20:47:20
521,818
11/26/2010 21:47:55
21
0
Ruby Dynamic Classes. How to fix "warning: class variable access from toplevel"
I'm trying to write a program that dynamically defines ruby classes based on configuration read from a file. I know I can use Class.new to do this. Here's an example program: <pre><code>x = [1,2,3] Test = Class.new do @@mylist = x def foo puts @@mylist end end Test.new.foo </code></pre> When I run this I get the following output: <pre><code>c:/utils/test.rb:4: warning: class variable access from toplevel c:/utils/test.rb:7: warning: class variable access from toplevel 1 2 3</code></pre> Does anyone know what causes these warnings and how I can get rid of them? Thanks in advance!
ruby
oop
dynamic
null
null
null
open
Ruby Dynamic Classes. How to fix "warning: class variable access from toplevel" === I'm trying to write a program that dynamically defines ruby classes based on configuration read from a file. I know I can use Class.new to do this. Here's an example program: <pre><code>x = [1,2,3] Test = Class.new do @@mylist = x def foo puts @@mylist end end Test.new.foo </code></pre> When I run this I get the following output: <pre><code>c:/utils/test.rb:4: warning: class variable access from toplevel c:/utils/test.rb:7: warning: class variable access from toplevel 1 2 3</code></pre> Does anyone know what causes these warnings and how I can get rid of them? Thanks in advance!
0
5,131,732
02/27/2011 06:03:46
636,212
02/27/2011 06:03:46
1
0
Infrastructure for high transactional system (language & hosting suggestion help)
Some of our friends (University students) are trying to develop a twitter type application, I want to plan for at least 1000 transactions per second (I know it's wishful thinking) for initial launch. This involves several people connecting and getting updates and posting (text + images) to site. In the back end db will server the data and also calculates rankings of what to push to user based on complex algorithm on the fly real-time. Our group is familiar with Java and Tomcat/MySQL. We can also easily learn/code in PHP/MySQL. What is the best suited platform for our purpose ? Though Java seem to be easy to implement for us I am afraid that hosting will be a bit difficult. I could find cloud based php hosting services (like rackspace cloudsites) at reasonable cost. Amazon EC2 is a bit over our heads to manage on day-to-day. Also any recommendation on hosting ? (PHP or Java) We don't have millions in seed money but about $20K to start with. Any advice on above or any thing in general approach is much appreciated.
java
php
hosting
startup
null
02/27/2011 09:00:09
not a real question
Infrastructure for high transactional system (language & hosting suggestion help) === Some of our friends (University students) are trying to develop a twitter type application, I want to plan for at least 1000 transactions per second (I know it's wishful thinking) for initial launch. This involves several people connecting and getting updates and posting (text + images) to site. In the back end db will server the data and also calculates rankings of what to push to user based on complex algorithm on the fly real-time. Our group is familiar with Java and Tomcat/MySQL. We can also easily learn/code in PHP/MySQL. What is the best suited platform for our purpose ? Though Java seem to be easy to implement for us I am afraid that hosting will be a bit difficult. I could find cloud based php hosting services (like rackspace cloudsites) at reasonable cost. Amazon EC2 is a bit over our heads to manage on day-to-day. Also any recommendation on hosting ? (PHP or Java) We don't have millions in seed money but about $20K to start with. Any advice on above or any thing in general approach is much appreciated.
1
3,897,693
10/09/2010 20:11:09
229,535
12/11/2009 10:31:49
1,598
49
Which tournament managment software for web-based tournaments?
This is possibly borderline for stackoverflow, as it's not a direct programming question. But, I am looking for a suitable software as a starting point from which to continue programming my desired customizations, so I hope it's close enough. Here are the requirements, for which I am looking for in a web-based tournament management software: - Customizable: open-source would be perfect, otherwise at least needs to support plug-ins to support different kinds of sports/games/results/etc. - Authentication: support for authenticated users that can be related to different tournaments as well as teams - Runs mostly non-supervised: as the tournaments are web-based I'd like to give contestants the possibility to sign-up themselves (based on authentication system to reduce the spamming problem) and report results themselves. Result reports vary dramatically based on the actual tournament, hence, may require some result determination plug-ins. The goal is to reduce the required manual effort by administrators. - Web interface: I am not interested in off-line tournament management software - Active: If in any way possible I'd like to build upon software that is maintained and/or in active development Some optional nice-to-have features would be: - automatic bracket generation with selectable algorithms (round-robin, KO system, etc) - visualizations (mainly brackets) - statistics I am asking this question after a few hours of researching alternatives I could find. I will list the tools here that I found and what is wrong with them for my purposes. Please feel free to help me improve my google-fu, or point out if I have overlooked something in my evaluations. - open tournament system: looks roughly like what I had in mind, but never seems to have taken off and is unmaintained for almost half a decade now - KMleague: also sounds nice, but doesn't appear to be maintained anymore (I couldn't get access to their forums for more information either. Never received the activation e-mail.) Maybe someone here knows it and whether it's worthwhile to check out the code as a starting point. - In this [SO thread][1] I found Tourney logic and TournamentAPI, which both require off-line management of the tournaments. Additionally, the first is commercial and the latter hasn't released anything yet. Several commercial products I quickly dismissed for their lack of customizability (most are strictly limited to a certain sport/game) and because all I came across where again off-line managed. [1]: http://stackoverflow.com/questions/1527185/any-tournament-apis-out-there
web-applications
tournament
language-agnostic
null
null
01/29/2012 16:10:00
not constructive
Which tournament managment software for web-based tournaments? === This is possibly borderline for stackoverflow, as it's not a direct programming question. But, I am looking for a suitable software as a starting point from which to continue programming my desired customizations, so I hope it's close enough. Here are the requirements, for which I am looking for in a web-based tournament management software: - Customizable: open-source would be perfect, otherwise at least needs to support plug-ins to support different kinds of sports/games/results/etc. - Authentication: support for authenticated users that can be related to different tournaments as well as teams - Runs mostly non-supervised: as the tournaments are web-based I'd like to give contestants the possibility to sign-up themselves (based on authentication system to reduce the spamming problem) and report results themselves. Result reports vary dramatically based on the actual tournament, hence, may require some result determination plug-ins. The goal is to reduce the required manual effort by administrators. - Web interface: I am not interested in off-line tournament management software - Active: If in any way possible I'd like to build upon software that is maintained and/or in active development Some optional nice-to-have features would be: - automatic bracket generation with selectable algorithms (round-robin, KO system, etc) - visualizations (mainly brackets) - statistics I am asking this question after a few hours of researching alternatives I could find. I will list the tools here that I found and what is wrong with them for my purposes. Please feel free to help me improve my google-fu, or point out if I have overlooked something in my evaluations. - open tournament system: looks roughly like what I had in mind, but never seems to have taken off and is unmaintained for almost half a decade now - KMleague: also sounds nice, but doesn't appear to be maintained anymore (I couldn't get access to their forums for more information either. Never received the activation e-mail.) Maybe someone here knows it and whether it's worthwhile to check out the code as a starting point. - In this [SO thread][1] I found Tourney logic and TournamentAPI, which both require off-line management of the tournaments. Additionally, the first is commercial and the latter hasn't released anything yet. Several commercial products I quickly dismissed for their lack of customizability (most are strictly limited to a certain sport/game) and because all I came across where again off-line managed. [1]: http://stackoverflow.com/questions/1527185/any-tournament-apis-out-there
4
9,520,501
03/01/2012 16:55:08
897,059
08/16/2011 16:05:00
74
9
How do you get the past tense of a verb?
How do you get the past tense of a verb without using memory heavy NLP frameworks? e.g. live to: lived try to: tried tap to: tapped boil to: boiled edit: I wrote something myself (stack overflow won't let me self answer) which seems to work: http://pastebin.com/yQCDDaz4
java
nlp
null
null
null
03/02/2012 17:27:03
not constructive
How do you get the past tense of a verb? === How do you get the past tense of a verb without using memory heavy NLP frameworks? e.g. live to: lived try to: tried tap to: tapped boil to: boiled edit: I wrote something myself (stack overflow won't let me self answer) which seems to work: http://pastebin.com/yQCDDaz4
4
8,608,937
12/22/2011 19:43:33
763,600
05/21/2011 02:34:42
385
4
Objective-C: basic memory management. Ownership of object?
I am looking through the Advanced Memory Management Programming Guide of Apple available at http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-BAJHFBGH For the following code: - (NSString *)fullName { NSString *string = [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName]; return string; } "Following the basic rules, you don’t own the string returned by stringWithFormat:, so you can safely return the string from the method.", (therefore, do not have to release it) - the guide Basic rule from another part of the guide: "You create an object using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy”", (this makes you the owner) So, who own the string? Thanks
objective-c
memory-management
null
null
null
null
open
Objective-C: basic memory management. Ownership of object? === I am looking through the Advanced Memory Management Programming Guide of Apple available at http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-BAJHFBGH For the following code: - (NSString *)fullName { NSString *string = [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName]; return string; } "Following the basic rules, you don’t own the string returned by stringWithFormat:, so you can safely return the string from the method.", (therefore, do not have to release it) - the guide Basic rule from another part of the guide: "You create an object using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy”", (this makes you the owner) So, who own the string? Thanks
0
140,680
09/26/2008 17:00:19
13,009
09/16/2008 16:37:56
197
9
Firebug - Run multiline scripts on console or make new javascript file
Is there a way in FireBug to start a new script file to apply to page? Basically I want to do work like I'd normally do on the firebug console but be able to to paste in multi-line functionss, etc. It doesn't seem like the console is amenable to that.
javascript
firebug
firefox
null
null
null
open
Firebug - Run multiline scripts on console or make new javascript file === Is there a way in FireBug to start a new script file to apply to page? Basically I want to do work like I'd normally do on the firebug console but be able to to paste in multi-line functionss, etc. It doesn't seem like the console is amenable to that.
0
6,375,378
06/16/2011 16:33:31
492,516
10/31/2010 01:39:53
1
0
Better choice: TextLayout or JTextComponent for an "ellipse with editable text" component?
If you've ever used Visio or a UML class diagram editor, you have an idea of what I'm trying to accomplish: Within a JFrame, users can add ellipses that enclose a small editable text field. These ellipses can be repositioned within the frame when the user drags them. Clicking on an ellipse causes the text to become editable: a carat appears, highlighting a substring is possible, etc. I've got the basic structure set up: the 'ellipse' is a self-contained component, with methods called on it from the containing JFrame and its listeners. I've tried two approaches: 1. in the component's draw() method, use a TextLayout to find bounds, position the contained text within the ellipse, and draw it to the frame using TextLayout's draw(). This is fast. Dragging the components around in the JFrame, mouse-over and mouse-click behavior are all straightforward. However for the editing functionality it looks like I will need to write a lot of custom code to handle hit testing, carat positioning, text highlighting, line wrapping, etc. 2. having the component contain a reference to the containing JFrame, and adding or repositioning a TextComponent in that JFrame after drawing the ellipse. This has the advantage of all the built-in TextComponent behavior for editing and line wrapping. But the logistics are really sloppy, and positioning the TextComponent becomes messy too - especially when the user drags the component around. I'm quite possibly thinking about this all wrong. Can anyone suggest a simple way to do this that I haven't yet stumbled across?
swing
jtextcomponent
null
null
null
null
open
Better choice: TextLayout or JTextComponent for an "ellipse with editable text" component? === If you've ever used Visio or a UML class diagram editor, you have an idea of what I'm trying to accomplish: Within a JFrame, users can add ellipses that enclose a small editable text field. These ellipses can be repositioned within the frame when the user drags them. Clicking on an ellipse causes the text to become editable: a carat appears, highlighting a substring is possible, etc. I've got the basic structure set up: the 'ellipse' is a self-contained component, with methods called on it from the containing JFrame and its listeners. I've tried two approaches: 1. in the component's draw() method, use a TextLayout to find bounds, position the contained text within the ellipse, and draw it to the frame using TextLayout's draw(). This is fast. Dragging the components around in the JFrame, mouse-over and mouse-click behavior are all straightforward. However for the editing functionality it looks like I will need to write a lot of custom code to handle hit testing, carat positioning, text highlighting, line wrapping, etc. 2. having the component contain a reference to the containing JFrame, and adding or repositioning a TextComponent in that JFrame after drawing the ellipse. This has the advantage of all the built-in TextComponent behavior for editing and line wrapping. But the logistics are really sloppy, and positioning the TextComponent becomes messy too - especially when the user drags the component around. I'm quite possibly thinking about this all wrong. Can anyone suggest a simple way to do this that I haven't yet stumbled across?
0
8,431,608
12/08/2011 13:19:28
275,264
02/17/2010 13:30:47
48
5
What is it that you can't do in Spring?
I am evaluating the use of XML configurations for our applications and I have some basic requirements as mentioned in [this stackoverflow link][1] [1]: http://stackoverflow.com/questions/8358791/how-to-create-java-objects-from-xml-tags-which-are-referring-each-other As per that discussion, it seems my requirements can be met by JAXB or Spring (perhaps, I need to write lesser amount of code in Spring). But I am not convinced about using Spring since my requirements are expected to grow (which is true for every application not just mine :-)) Keeping that in mind, I am inclined to go with JAXB, so that I am able to extend my XML in any way I require. But as of now I am not able to think about the kind of use case where Spring will fail me. Could someone please share their experience of some scenarios where Spring does not provide enough flexibility and scenarios where JAXB would be much much better off to use.
java
xml
spring
jaxb
null
12/09/2011 01:14:02
not constructive
What is it that you can't do in Spring? === I am evaluating the use of XML configurations for our applications and I have some basic requirements as mentioned in [this stackoverflow link][1] [1]: http://stackoverflow.com/questions/8358791/how-to-create-java-objects-from-xml-tags-which-are-referring-each-other As per that discussion, it seems my requirements can be met by JAXB or Spring (perhaps, I need to write lesser amount of code in Spring). But I am not convinced about using Spring since my requirements are expected to grow (which is true for every application not just mine :-)) Keeping that in mind, I am inclined to go with JAXB, so that I am able to extend my XML in any way I require. But as of now I am not able to think about the kind of use case where Spring will fail me. Could someone please share their experience of some scenarios where Spring does not provide enough flexibility and scenarios where JAXB would be much much better off to use.
4
8,105,958
11/12/2011 16:55:30
938,436
09/10/2011 17:30:47
16
2
setTimeOut didn't worked in $(document).ready()
When I used the setTimeOut() in the document.ready function, it is not working. The following is the code that I have used: $(document).ready(function(){ function abc{ alert('Hi'); } setTimeOut (abc, 2000); }); What did I missed ? Thank you :)
javascript
jquery
html
null
null
11/12/2011 17:57:20
too localized
setTimeOut didn't worked in $(document).ready() === When I used the setTimeOut() in the document.ready function, it is not working. The following is the code that I have used: $(document).ready(function(){ function abc{ alert('Hi'); } setTimeOut (abc, 2000); }); What did I missed ? Thank you :)
3
6,801,899
07/23/2011 16:54:18
683,512
03/30/2011 07:57:08
117
1
How does "deep freeze" works ?
as we all know there is a software called "deep freeze" which you probably know what it does. Anyway, after some googling I noticed that kind of software(s) called sandboxing or virtualization software however, Im not quite sure since my further searches failed me. So, here is my question: How does deepfreeze actually works ? If it were making image of everything in computer(its called virtualization I guess) it would take so much space. If it were creating index of every file and checking them regulary, then it would make my computer "freeze". So whats the magic ? How does it actually works ? does it realize when I download files by some way ?
c#
windows
virtualization
sandboxing
deepfreeze
07/23/2011 17:18:27
not a real question
How does "deep freeze" works ? === as we all know there is a software called "deep freeze" which you probably know what it does. Anyway, after some googling I noticed that kind of software(s) called sandboxing or virtualization software however, Im not quite sure since my further searches failed me. So, here is my question: How does deepfreeze actually works ? If it were making image of everything in computer(its called virtualization I guess) it would take so much space. If it were creating index of every file and checking them regulary, then it would make my computer "freeze". So whats the magic ? How does it actually works ? does it realize when I download files by some way ?
1
5,507,225
03/31/2011 22:38:52
657,142
03/13/2011 02:28:49
20
0
How do i secure this PHP script?
I'm worried about sql injection, so how do i prevent it? I'm using this script but have had several people tell me its very insecure, if anyone can help by telling me how it would be great :). source code: if(isset($_POST['lastmsg'])) { $lastmsg=$_POST['lastmsg']; $result=mysql_query("SELECT * FROM updates WHERE item_id<'$lastmsg' ORDER BY item_id DESC LIMIT 16"); $count=mysql_num_rows($result); while($row=mysql_fetch_array($result)) { $msg_id=$row['item_id']; $message=$row['item_content'];
php
security
sql-injection
null
null
null
open
How do i secure this PHP script? === I'm worried about sql injection, so how do i prevent it? I'm using this script but have had several people tell me its very insecure, if anyone can help by telling me how it would be great :). source code: if(isset($_POST['lastmsg'])) { $lastmsg=$_POST['lastmsg']; $result=mysql_query("SELECT * FROM updates WHERE item_id<'$lastmsg' ORDER BY item_id DESC LIMIT 16"); $count=mysql_num_rows($result); while($row=mysql_fetch_array($result)) { $msg_id=$row['item_id']; $message=$row['item_content'];
0
9,470,377
02/27/2012 18:41:10
1,051,935
11/17/2011 13:53:05
128
0
Application crashing with segue identifier in UITableViews
I am trying make a segue call in a tableview , but the application crashes when I click on the cell ... -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ switch (indexPath.row){ case 0: [self performSegueWithIdentifier: @"segue1" sender: self]; break; case 1: [self performSegueWithIdentifier: @"segue2" sender: self]; break; case 2: [self button1]; break; case 3: [self button2]; break; } case 2 and 3 work perfectly fine , but case 0 and 1 crash with the following green error : thread 1:Program received signal "SIGBART". thanks
objective-c
xcode4.2
storyboard
segue
null
null
open
Application crashing with segue identifier in UITableViews === I am trying make a segue call in a tableview , but the application crashes when I click on the cell ... -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ switch (indexPath.row){ case 0: [self performSegueWithIdentifier: @"segue1" sender: self]; break; case 1: [self performSegueWithIdentifier: @"segue2" sender: self]; break; case 2: [self button1]; break; case 3: [self button2]; break; } case 2 and 3 work perfectly fine , but case 0 and 1 crash with the following green error : thread 1:Program received signal "SIGBART". thanks
0
9,363,393
02/20/2012 15:13:31
79,455
03/18/2009 11:54:26
1,510
58
good looking docbook title page for design documents
I am looking for a good looking PDF title page for (software) design or technical documents using docbook. The title page should use the layout commonly used by these documents with revision history, copyright notice at the bottom etc. The default book title page does not include revision history or authors e-mail addresses. I know I can do this myself but to get it right and good looking will take a lot of effort and learning how docbook and FO works. Since others probably also use docbook I was wondering if they are willing to share their templates and configuration xsl. I tried to google for it I could not find a complete example of a good looking title page.
docbook
design-documentation
null
null
null
null
open
good looking docbook title page for design documents === I am looking for a good looking PDF title page for (software) design or technical documents using docbook. The title page should use the layout commonly used by these documents with revision history, copyright notice at the bottom etc. The default book title page does not include revision history or authors e-mail addresses. I know I can do this myself but to get it right and good looking will take a lot of effort and learning how docbook and FO works. Since others probably also use docbook I was wondering if they are willing to share their templates and configuration xsl. I tried to google for it I could not find a complete example of a good looking title page.
0
9,796,604
03/20/2012 23:34:28
129,195
06/26/2009 04:27:31
10,422
714
Public holiday web service
I've looked at; http://stackoverflow.com/questions/6567554/public-holiday-syndication-feed-service http://stackoverflow.com/questions/59934/national-holiday-web-service But does anyone know of a WebService or Syndication for Australian Public Holidays?
c#
web-services
syndication-feed
holidays
null
03/21/2012 06:35:35
too localized
Public holiday web service === I've looked at; http://stackoverflow.com/questions/6567554/public-holiday-syndication-feed-service http://stackoverflow.com/questions/59934/national-holiday-web-service But does anyone know of a WebService or Syndication for Australian Public Holidays?
3
6,066,536
05/20/2011 01:16:41
753,726
05/14/2011 15:20:16
18
0
Why my Facebook Profile can't be viewed (found) from logged out?
While i'm logged out, my Facebook Profile **can not** be seen then.<br> I just wanna let others see me when i give them my link.<br><br> All others Facebook Profiles can be viewed without login.<br> I mean, for example you can see yourself: https://www.facebook.com/xxxxxxxxxxxxxxx <br>For my profile, it is showing like: > This content is currently unavailable!<br> The page you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page. What privacy tweak should i do?
facebook
profile
privacy
null
null
05/20/2011 12:45:43
off topic
Why my Facebook Profile can't be viewed (found) from logged out? === While i'm logged out, my Facebook Profile **can not** be seen then.<br> I just wanna let others see me when i give them my link.<br><br> All others Facebook Profiles can be viewed without login.<br> I mean, for example you can see yourself: https://www.facebook.com/xxxxxxxxxxxxxxx <br>For my profile, it is showing like: > This content is currently unavailable!<br> The page you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page. What privacy tweak should i do?
2
6,181,530
05/30/2011 23:16:12
776,887
05/30/2011 23:16:12
1
0
XSLT accumulate
I have a parent variable and two child variables for accumulate I would like to use those two child variables to select two different values I can only hardcode it to make it works like all other tutorial for example: $parent[1]/Price and $parent[1]/Quantity but insteads I want the following: $parent[1]/$child1 where $parent[1] = orders[1]/order and $child1 = price $parent[1]/$child2 where $parent[1] = orders[1]/order and $child2 = quantity <subtotal> <xsl:call-template name="total"> <xsl:with-param name="pList" select="$parent"/> <xsl:with-param name="price" select="Price"/> <xsl:with-param name="quantity" select="Quantity"/> </xsl:call-template> </subtotal> <xsl:template name="total"> <xsl:param name="pListItem"/> <xsl:param name="pAccum" select="0"/> <xsl:param name="price"/> <xsl:param name="quantity"/> <xsl:choose> <xsl:when test="$pListItem"> <xsl:call-template name="total"> <xsl:with-param name="pListItem" select="$pListItem[position() > 1]"/> <xsl:with-param name="pAccum" select="$pAccum + $vHead/$price * $vHead/$quantity"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$pAccum"/> </xsl:otherwise> </xsl:choose> </xsl:template>
xml
xslt
accumulate
null
null
null
open
XSLT accumulate === I have a parent variable and two child variables for accumulate I would like to use those two child variables to select two different values I can only hardcode it to make it works like all other tutorial for example: $parent[1]/Price and $parent[1]/Quantity but insteads I want the following: $parent[1]/$child1 where $parent[1] = orders[1]/order and $child1 = price $parent[1]/$child2 where $parent[1] = orders[1]/order and $child2 = quantity <subtotal> <xsl:call-template name="total"> <xsl:with-param name="pList" select="$parent"/> <xsl:with-param name="price" select="Price"/> <xsl:with-param name="quantity" select="Quantity"/> </xsl:call-template> </subtotal> <xsl:template name="total"> <xsl:param name="pListItem"/> <xsl:param name="pAccum" select="0"/> <xsl:param name="price"/> <xsl:param name="quantity"/> <xsl:choose> <xsl:when test="$pListItem"> <xsl:call-template name="total"> <xsl:with-param name="pListItem" select="$pListItem[position() > 1]"/> <xsl:with-param name="pAccum" select="$pAccum + $vHead/$price * $vHead/$quantity"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$pAccum"/> </xsl:otherwise> </xsl:choose> </xsl:template>
0
9,704,379
03/14/2012 14:56:26
883,807
08/08/2011 10:05:44
114
1
What is the most flexible, feature rich Twitter API for C# or Python?
I am looking for the most flexible, feature Twitter API for C# that will allow me to: - Take a list and auto add the list's members to a users own personal list. - Find all the people who @ reply to me and add them to a personal list - Run Twitter searches That is what I need for now but I know I will need as many features as possible. So I think I am looking for the most able, complex Twitter API for either C# or Python.
c#
python
api
twitter
twitter-api
04/06/2012 17:22:16
not constructive
What is the most flexible, feature rich Twitter API for C# or Python? === I am looking for the most flexible, feature Twitter API for C# that will allow me to: - Take a list and auto add the list's members to a users own personal list. - Find all the people who @ reply to me and add them to a personal list - Run Twitter searches That is what I need for now but I know I will need as many features as possible. So I think I am looking for the most able, complex Twitter API for either C# or Python.
4
10,788,668
05/28/2012 17:55:32
1,422,193
05/28/2012 17:29:10
1
0
Haskell: Set generation from a list of mixed types
I'm trying to generate a new list from a type that is essentially a list that contains mixed types. I'm unsure about the technical description of this so I apologize in advance, but I think I can explain by using examples and code. For example, I have a type/list with the following types defined: type Database = [(Person, [Book]) ] type Person = String type Book = String testBase :: Database testBase = [("Alice",["TinTin", "Wizard of Oz"]), ("Rory", ["Learn Erlang", "Learn Haskell"]) ] In the above Database type, I have a "simulated" library. The first value (Person) is the named of the borrower, and the second value, the list, contains all the books that the person has borrowed. Based on this information, I want to be able to have a function that takes the person's name, and returns a list of the books they have borrowed. For instance, having an argument of "Alice" should return: ["TinTin", "Wizard of Oz"] The function I created looks like this, but returns an empty list. I want it to return a list containing book values i.e. [Book]. What am I supposed to do to make this code work? borrowedBooks :: Database -> Person -> [Book] borrowedBooks dBase findPerson = [book | (person,[book]) <- dBase, person == findPerson ] Thanks
list
haskell
set
generator
generation
null
open
Haskell: Set generation from a list of mixed types === I'm trying to generate a new list from a type that is essentially a list that contains mixed types. I'm unsure about the technical description of this so I apologize in advance, but I think I can explain by using examples and code. For example, I have a type/list with the following types defined: type Database = [(Person, [Book]) ] type Person = String type Book = String testBase :: Database testBase = [("Alice",["TinTin", "Wizard of Oz"]), ("Rory", ["Learn Erlang", "Learn Haskell"]) ] In the above Database type, I have a "simulated" library. The first value (Person) is the named of the borrower, and the second value, the list, contains all the books that the person has borrowed. Based on this information, I want to be able to have a function that takes the person's name, and returns a list of the books they have borrowed. For instance, having an argument of "Alice" should return: ["TinTin", "Wizard of Oz"] The function I created looks like this, but returns an empty list. I want it to return a list containing book values i.e. [Book]. What am I supposed to do to make this code work? borrowedBooks :: Database -> Person -> [Book] borrowedBooks dBase findPerson = [book | (person,[book]) <- dBase, person == findPerson ] Thanks
0
10,521,416
05/09/2012 17:50:39
1,278,943
03/19/2012 15:43:34
305
31
Option menu default gray border removal
in my app i have option menu i try to customize it , i did it by refer it to style , what i need is either removal of default gray border around option menu or customize it to another color . any advice will be appreciated . as shown below : ![enter image description here][1] My code : public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.cool_menu, menu); getLayoutInflater().setFactory(new Factory() { public View onCreateView(String name, Context context, AttributeSet attrs) { if (name .equalsIgnoreCase("com.android.internal.view.menu.IconMenuItemView")) { try { LayoutInflater li = LayoutInflater.from(context); final View view = li.createView(name, null, attrs); new Handler().post(new Runnable() { public void run() { view .setBackgroundResource(R.drawable.border1); ((TextView) view).setTextSize(20); ((TextView) view).setTextColor(Color.RED); } }); return view; } catch (InflateException e) {} catch (ClassNotFoundException e) {} } return null; } }); return super.onCreateOptionsMenu(menu); } [1]: http://i.stack.imgur.com/TDamH.png
java
android
null
null
null
null
open
Option menu default gray border removal === in my app i have option menu i try to customize it , i did it by refer it to style , what i need is either removal of default gray border around option menu or customize it to another color . any advice will be appreciated . as shown below : ![enter image description here][1] My code : public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.cool_menu, menu); getLayoutInflater().setFactory(new Factory() { public View onCreateView(String name, Context context, AttributeSet attrs) { if (name .equalsIgnoreCase("com.android.internal.view.menu.IconMenuItemView")) { try { LayoutInflater li = LayoutInflater.from(context); final View view = li.createView(name, null, attrs); new Handler().post(new Runnable() { public void run() { view .setBackgroundResource(R.drawable.border1); ((TextView) view).setTextSize(20); ((TextView) view).setTextColor(Color.RED); } }); return view; } catch (InflateException e) {} catch (ClassNotFoundException e) {} } return null; } }); return super.onCreateOptionsMenu(menu); } [1]: http://i.stack.imgur.com/TDamH.png
0
6,069,123
05/20/2011 08:07:21
699,174
04/08/2011 18:39:34
13
0
Problem with SurfaceView and its holder
I tried to use SurfaceView, but the view appeared black and nothing painted Here My code package com.samples; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.BlurMaskFilter; import android.graphics.BlurMaskFilter.Blur; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PorterDuff; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.RectF; import android.graphics.Region; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceHolder.Callback; import android.view.SurfaceView; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; public class Galary extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(new GalaryView(this)); } private static class GalaryView extends SurfaceView implements Callback { private SurfaceHolder surfaceHolder; public GalaryView(Context context) { super(context); surfaceHolder = getHolder(); surfaceHolder.addCallback(this); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub Effects effects= new Effects(surfaceHolder, this); effects.start(); } @Override public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub } } } and the second file package com.samples; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.Region; import android.view.SurfaceHolder; import android.view.SurfaceView; public class Effects extends Thread { private SurfaceView surfaceView; private SurfaceHolder surfaceHolder; private Bitmap bitmap1; private Path mPath; private Bitmap bitmap2; private Paint paint; public Effects(SurfaceHolder surfaceHolder, SurfaceView surfaceView) { this.surfaceView = surfaceView; this.surfaceHolder = surfaceHolder; this.mPath = new Path(); bitmap1 = BitmapFactory.decodeResource(surfaceView.getContext() .getResources(), R.drawable.qina1); bitmap2 = BitmapFactory.decodeResource(surfaceView.getContext() .getResources(), R.drawable.qina2); paint= new Paint(); } @Override public void run() { Canvas canvas = surfaceHolder.lockCanvas(); canvas.drawColor(Color.WHITE); for (int i = 1; i < 100; i++) { canvas.drawBitmap(bitmap1, 0, 0, null); canvas.save(); canvas.translate(0, 0); mPath.reset(); canvas.clipPath(mPath); int ovalWidth = (int) (surfaceView.getWidth() * (i / 100.0)); int ovalHeight = (int) (surfaceView.getHeight() * (i / 100.0)); int ovalX = (surfaceView.getWidth() - ovalWidth) / 2; int ovalY = (surfaceView.getHeight() - ovalHeight) / 2; mPath.addOval(new RectF(ovalX, ovalY, ovalWidth + ovalX, ovalHeight + ovalY), Path.Direction.CCW); canvas.clipPath(mPath, Region.Op.REPLACE); canvas.drawBitmap(bitmap2, 0, 0, paint); canvas.restore(); try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } Please could you tell me what is the problem? Thanks a lot
android
null
null
null
null
null
open
Problem with SurfaceView and its holder === I tried to use SurfaceView, but the view appeared black and nothing painted Here My code package com.samples; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.BlurMaskFilter; import android.graphics.BlurMaskFilter.Blur; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PorterDuff; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.RectF; import android.graphics.Region; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceHolder.Callback; import android.view.SurfaceView; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; public class Galary extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(new GalaryView(this)); } private static class GalaryView extends SurfaceView implements Callback { private SurfaceHolder surfaceHolder; public GalaryView(Context context) { super(context); surfaceHolder = getHolder(); surfaceHolder.addCallback(this); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub Effects effects= new Effects(surfaceHolder, this); effects.start(); } @Override public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub } } } and the second file package com.samples; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.Region; import android.view.SurfaceHolder; import android.view.SurfaceView; public class Effects extends Thread { private SurfaceView surfaceView; private SurfaceHolder surfaceHolder; private Bitmap bitmap1; private Path mPath; private Bitmap bitmap2; private Paint paint; public Effects(SurfaceHolder surfaceHolder, SurfaceView surfaceView) { this.surfaceView = surfaceView; this.surfaceHolder = surfaceHolder; this.mPath = new Path(); bitmap1 = BitmapFactory.decodeResource(surfaceView.getContext() .getResources(), R.drawable.qina1); bitmap2 = BitmapFactory.decodeResource(surfaceView.getContext() .getResources(), R.drawable.qina2); paint= new Paint(); } @Override public void run() { Canvas canvas = surfaceHolder.lockCanvas(); canvas.drawColor(Color.WHITE); for (int i = 1; i < 100; i++) { canvas.drawBitmap(bitmap1, 0, 0, null); canvas.save(); canvas.translate(0, 0); mPath.reset(); canvas.clipPath(mPath); int ovalWidth = (int) (surfaceView.getWidth() * (i / 100.0)); int ovalHeight = (int) (surfaceView.getHeight() * (i / 100.0)); int ovalX = (surfaceView.getWidth() - ovalWidth) / 2; int ovalY = (surfaceView.getHeight() - ovalHeight) / 2; mPath.addOval(new RectF(ovalX, ovalY, ovalWidth + ovalX, ovalHeight + ovalY), Path.Direction.CCW); canvas.clipPath(mPath, Region.Op.REPLACE); canvas.drawBitmap(bitmap2, 0, 0, paint); canvas.restore(); try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } Please could you tell me what is the problem? Thanks a lot
0
6,545,602
07/01/2011 08:43:23
655,293
03/11/2011 11:59:08
14
1
handling big apllications and big databases
I allready have programmed some small applications, the database design was simple, just one normalized database containing all the datas I need for the application. Now I want to try to programm something bigger: There should be 4 websites build with MVC3. All the websites should use only one SQL-Membership-Database and some tables like contacts and so on should be shared between the diferent pages too. **Now my question is: how to start?** **1.** Should I use one database for all the tables (each application needs up to 40 different tables) including the shared tables like the SQL-Membership-Database or should I create one database for Shared Data, one for Application 1, one for Application 2 and so on? **2.** Should I put all the Applications into one MVC3-application and just seperate them by using areas? **3.** All the applications need to save text and pictures, should I use one Table for pictures from Application 1/2/3... and choose them by an application ID or should I create a image-table for each application (same question for texts and descriptions and tooltipps...)? **4.** My idea was to work woth blob (MS sql 2008 R2) to save files, do you think a good choice? Is there anyone who have got tipps ore experiances in creating huge (for me its huge ;-)) applications like this? lot of thanks and greetings HW
sql-server
database
sql-server-2008
asp.net-mvc-3
asp.net-mvc-3-areas
10/25/2011 17:13:28
not a real question
handling big apllications and big databases === I allready have programmed some small applications, the database design was simple, just one normalized database containing all the datas I need for the application. Now I want to try to programm something bigger: There should be 4 websites build with MVC3. All the websites should use only one SQL-Membership-Database and some tables like contacts and so on should be shared between the diferent pages too. **Now my question is: how to start?** **1.** Should I use one database for all the tables (each application needs up to 40 different tables) including the shared tables like the SQL-Membership-Database or should I create one database for Shared Data, one for Application 1, one for Application 2 and so on? **2.** Should I put all the Applications into one MVC3-application and just seperate them by using areas? **3.** All the applications need to save text and pictures, should I use one Table for pictures from Application 1/2/3... and choose them by an application ID or should I create a image-table for each application (same question for texts and descriptions and tooltipps...)? **4.** My idea was to work woth blob (MS sql 2008 R2) to save files, do you think a good choice? Is there anyone who have got tipps ore experiances in creating huge (for me its huge ;-)) applications like this? lot of thanks and greetings HW
1
5,696,053
04/17/2011 19:58:02
586,687
01/23/2011 21:18:27
67
1
turn on computer since c# and execute my program when computer turn on? how to do it?
well i am developing a simple program (for me) it is for anote notes, you put a day and a time to your note, when it was the time and day, it appears a ballontip, i have a problem here to, any time i put to this ballontip, it ever get to be only 5 secunds DateTime hora; DataTable tabla = daonota.seleccionaraahora(); if (tabla.Rows.Count == 1) { hora =Convert.ToDateTime( tabla.Rows[0][4].ToString()); string titulo = tabla.Rows[0][1].ToString(); String texto = tabla.Rows[0][2].ToString(); texto=texto+"\nFecha programada="+tabla.Rows[0][3].ToString(); texto = texto + "\nHora programada=" + tabla.Rows[0][4].ToString(); notifyIcon1.ShowBalloonTip(10000, titulo, texto, ToolTipIcon.Info); } i have this code in a timer (timer1) it do a query every secund, do you know any form better for to do it (goal is it appears a ballon tip in the time put) well i want to to ... if the computer is turn off, it turn on, any code for to do it since c#? and another thing... how do i do, my program is execute since the computer turn on, automatically?
c#
c#-4.0
c#-3.0
c#-2.0
c#-to-vb.net
04/18/2011 00:58:00
not a real question
turn on computer since c# and execute my program when computer turn on? how to do it? === well i am developing a simple program (for me) it is for anote notes, you put a day and a time to your note, when it was the time and day, it appears a ballontip, i have a problem here to, any time i put to this ballontip, it ever get to be only 5 secunds DateTime hora; DataTable tabla = daonota.seleccionaraahora(); if (tabla.Rows.Count == 1) { hora =Convert.ToDateTime( tabla.Rows[0][4].ToString()); string titulo = tabla.Rows[0][1].ToString(); String texto = tabla.Rows[0][2].ToString(); texto=texto+"\nFecha programada="+tabla.Rows[0][3].ToString(); texto = texto + "\nHora programada=" + tabla.Rows[0][4].ToString(); notifyIcon1.ShowBalloonTip(10000, titulo, texto, ToolTipIcon.Info); } i have this code in a timer (timer1) it do a query every secund, do you know any form better for to do it (goal is it appears a ballon tip in the time put) well i want to to ... if the computer is turn off, it turn on, any code for to do it since c#? and another thing... how do i do, my program is execute since the computer turn on, automatically?
1
1,957,172
12/24/2009 07:11:05
95,642
04/24/2009 17:59:07
16
5
Using installed gems in Ruby with 'require'
I do something like `sudo gem install json`. Then I do `irb`. Then I do `require 'json'`. Then it says `no such file to load -- json`
ruby
gem
null
null
null
null
open
Using installed gems in Ruby with 'require' === I do something like `sudo gem install json`. Then I do `irb`. Then I do `require 'json'`. Then it says `no such file to load -- json`
0
6,477,406
06/25/2011 11:22:40
676,829
03/25/2011 13:44:41
31
0
performance issue
Our is a considerably big project developed in Asp.Net 2.0 Web forms (Three layer architecture). The project consitutes of; * separate Class Library for each module (thus the count for web site is more) * Class having a const for each stored procedure name * multiple .resx files to store keep value pairs + separate Class Library to fetch data from them * separate class Library to fetch values from Web.config appsettings * enterprise library to avoid passing stored procedure parameter names * Assignment of href for anchors at run time * Thus lengthy call stack for all operations Is it so above one or multiple things are causing the web site to run slow. Suggestions will be highly appreciated. thanks in advance
performance
null
null
null
null
06/25/2011 11:45:39
too localized
performance issue === Our is a considerably big project developed in Asp.Net 2.0 Web forms (Three layer architecture). The project consitutes of; * separate Class Library for each module (thus the count for web site is more) * Class having a const for each stored procedure name * multiple .resx files to store keep value pairs + separate Class Library to fetch data from them * separate class Library to fetch values from Web.config appsettings * enterprise library to avoid passing stored procedure parameter names * Assignment of href for anchors at run time * Thus lengthy call stack for all operations Is it so above one or multiple things are causing the web site to run slow. Suggestions will be highly appreciated. thanks in advance
3
7,166,070
08/23/2011 18:54:06
235,708
12/21/2009 00:29:15
3,900
248
Filter out Facebook Contacts from the Contact Picker
I have a contact picker in my application that keeps crashing when a facebook contact is selected. I won't have the code I'm using to open the picker in front of me, but I believe I'm accessing the contacts through a call similar to this: new Intent(Intent.ACTION_PICK, People.CONTENT_URI) Does anyone have experience with this?
android
android-contacts
contactscontract
null
null
null
open
Filter out Facebook Contacts from the Contact Picker === I have a contact picker in my application that keeps crashing when a facebook contact is selected. I won't have the code I'm using to open the picker in front of me, but I believe I'm accessing the contacts through a call similar to this: new Intent(Intent.ACTION_PICK, People.CONTENT_URI) Does anyone have experience with this?
0
10,207,998
04/18/2012 11:00:57
777,283
05/31/2011 08:02:34
18
3
simple edit on an open java source project in eclipse not taking effect
i'm trying to edit a java open source project... the project is in eclipse consisting of 10 packages with an average of 8 classes each, two jar files etc... the project have classes for socket connection with client, saving info to mysql database, querying and doing computation on data and doing an output-simulator in a ui with google maps. My main goal is to try to edit the computation of data to achieve better results. When i try to edit the classes concerned on the input socket connection, i can see in the printout in the console that it is being changed and saved and executed and printed out. My problem is when i try to edit the succeeding classes in eclipse, like a simple edit on the printout string , the edit will not be shown in the console or the command prompt. It will still show the previous string before i changed it. Why are simple edits not being implemented in the project. I cannot move on to changing the computation since simple edit on the printout string will not be implemented. I'm still a java newbie so i definitely need your input please. thnks
java
javascript
eclipse
null
null
null
open
simple edit on an open java source project in eclipse not taking effect === i'm trying to edit a java open source project... the project is in eclipse consisting of 10 packages with an average of 8 classes each, two jar files etc... the project have classes for socket connection with client, saving info to mysql database, querying and doing computation on data and doing an output-simulator in a ui with google maps. My main goal is to try to edit the computation of data to achieve better results. When i try to edit the classes concerned on the input socket connection, i can see in the printout in the console that it is being changed and saved and executed and printed out. My problem is when i try to edit the succeeding classes in eclipse, like a simple edit on the printout string , the edit will not be shown in the console or the command prompt. It will still show the previous string before i changed it. Why are simple edits not being implemented in the project. I cannot move on to changing the computation since simple edit on the printout string will not be implemented. I'm still a java newbie so i definitely need your input please. thnks
0
7,814,202
10/18/2011 21:51:34
218,121
11/24/2009 20:48:33
147
23
Oracle: Retrieve by TZNAME
How can we find out which TZNAME we are under in our Database? If we do a select dbtimezone from dual I get dbtimezone = -04:00 we retrieve the DBTIMEZONE which is the number representation of the timezone, but since there are many of them but in different places, we won't be able to be 100 % accurate. Example, currently we have -04:00 which can be Both EST CANADA and EST NY (or a date that doesn't involve daylights savings) Is there any way to retrieve the actual TZNAME of the database timezone rather than the actual time? Thank you
oracle
null
null
null
null
null
open
Oracle: Retrieve by TZNAME === How can we find out which TZNAME we are under in our Database? If we do a select dbtimezone from dual I get dbtimezone = -04:00 we retrieve the DBTIMEZONE which is the number representation of the timezone, but since there are many of them but in different places, we won't be able to be 100 % accurate. Example, currently we have -04:00 which can be Both EST CANADA and EST NY (or a date that doesn't involve daylights savings) Is there any way to retrieve the actual TZNAME of the database timezone rather than the actual time? Thank you
0
8,889,226
01/17/2012 03:12:40
1,118,140
12/27/2011 18:59:54
24
0
How can I parse an XML file given it's path in Jquery?
So I am trying to parse a XML file that a user choose through a file chooser. The problem I am having is on my input change event, the jquery is not being call. $('input[type=file]').change(function(e){ path = $(this).val(); $.ajax({ type: "GET", url: path, dataType: "xml", success: parseXml }); }); function parseXml(xml) { head = xml; alert('I reached here'); }
javascript
jquery
html
null
null
null
open
How can I parse an XML file given it's path in Jquery? === So I am trying to parse a XML file that a user choose through a file chooser. The problem I am having is on my input change event, the jquery is not being call. $('input[type=file]').change(function(e){ path = $(this).val(); $.ajax({ type: "GET", url: path, dataType: "xml", success: parseXml }); }); function parseXml(xml) { head = xml; alert('I reached here'); }
0
10,291,892
04/24/2012 04:50:05
1,352,825
04/24/2012 04:43:59
1
0
Segue to Tab Bar Controller
I have this problem: I have an app that has 2 parts, the first part is when it's the first time the user opens the app, a screen with "whats your name" appears and he follows to a screen that has some buttons and it ends in a tableview where he can press a button in the footer to go to the other part of the app that is a view controller with 2 buttons: 1 - Go back to that first button screen (after whats your name), 2 - Go to tab bar controller. My problem is: when I segue to the tab bar controller 2 navigation bar's appear oO. I've read through the internet that I can't push a tab bar controller into a navigation stack, is that true? So what is the solution for my UI? Since I want the user to be able to go back to that test screen, but I want to use this tab bar controller as well. Thanks in advance!
objective-c
ios
user-interface
uitabbarcontroller
segue
null
open
Segue to Tab Bar Controller === I have this problem: I have an app that has 2 parts, the first part is when it's the first time the user opens the app, a screen with "whats your name" appears and he follows to a screen that has some buttons and it ends in a tableview where he can press a button in the footer to go to the other part of the app that is a view controller with 2 buttons: 1 - Go back to that first button screen (after whats your name), 2 - Go to tab bar controller. My problem is: when I segue to the tab bar controller 2 navigation bar's appear oO. I've read through the internet that I can't push a tab bar controller into a navigation stack, is that true? So what is the solution for my UI? Since I want the user to be able to go back to that test screen, but I want to use this tab bar controller as well. Thanks in advance!
0
4,190,564
11/16/2010 02:00:51
316,597
04/14/2010 14:27:47
1
1
Restlet On Android - Issues with serialization
I am trying to retrieve serialized classes using Restlet 2.1 with Android as the client and GAE as the server. This is the relevant code: ClientResource cr = new ClientResource("http://localhost:8888/mydata"); // Get the MyData object MyDataResource resource = cr.wrap(MyDataResource.class); MyData myData = resource.retrieve(); I initially tested this in a standalone JSE class, and everything worked fine. When I try to run the same thing in Android, the myData object is null. Any ideas?
java
android
serialization
restlet
deserialization
null
open
Restlet On Android - Issues with serialization === I am trying to retrieve serialized classes using Restlet 2.1 with Android as the client and GAE as the server. This is the relevant code: ClientResource cr = new ClientResource("http://localhost:8888/mydata"); // Get the MyData object MyDataResource resource = cr.wrap(MyDataResource.class); MyData myData = resource.retrieve(); I initially tested this in a standalone JSE class, and everything worked fine. When I try to run the same thing in Android, the myData object is null. Any ideas?
0
3,603,754
08/30/2010 19:55:23
162,265
08/24/2009 19:55:44
8
0
RPM PHP and PEAR Packages
I'm trying to package a custom build of the latest PHP (5.3.3) with a set of pear packages. Unfortunately, the options given to do this don't seem to work. I'm posting the spec file as I see it should be. The version given doesn't actually fail, but it installs the PEAR packages in the wrong location. While they should go in /var/tmp/my_php-5.3.3-1-buildroot/usr/local/lib/php, but they end up in /var/tmp/my_php-5.3.3-1-buildroot/var/tmp/my_php-5.3.3-1-buildroot/usr/local/lib/php. You can also see where I had to hack the pearcmd.php script because it was completely ignoring the include_path setting the pear command passed it (derived from the PHP_PEAR_INSTALL_DIR environment variable). This could be completely wrong, but it's the only way I could get it to actually install anything at all. I have tried many other variations of this spec, but they all seem to "fail" in their own way. FYI, I've also tried using Pyrus, but it had similar issues (in addition to issues with non-PEAR2 packages). %define PHP_PREFIX /usr/local %define CONF_PREFIX /home/config/php/conf %define APXS_PATH /usr/local/apache2/bin/apxs %define ORCL_PATH /usr/local/lib/oracle %define PHP %{PHP_PREFIX}/bin/php %define PEAR %{PHP_PREFIX}/bin/pear %define PEAR_ROOT %{PHP_PREFIX}/lib/php %define PHP_INSTALL $RPM_BUILD_ROOT%{PHP} %define PEAR_INSTALL $RPM_BUILD_ROOT%{PEAR} %define PEAR_ROOT_INSTALL $RPM_BUILD_ROOT%{PEAR_ROOT} %define PEARCMD %{PEAR_ROOT_INSTALL}/pearcmd.php %define PECLCMD %{PEAR_ROOT_INSTALL}/peclcmd.php %define _unpackaged_files_terminate_build 0 Summary: my_php package Name: my_php Version: 5.3.3 Release: 1 License: The PHP License, Version 3.01 Vendor: Me Packager: Me <me@blah.com> Group: Development/Languages BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Source0: php-%{version}.tar.bz2 Requires: my_httpd >= 2.2.0, oracle-instantclient >= 10.2.0.4 BuildRequires: my_httpd >= 2.2.0 Conflicts: php, php5 %description PHP, My style %prep %setup -q -n php-%{version} %build LIB_DIR="lib" if [ "%{_arch}" == "x86_64" ]; then LIB_DIR="lib64" fi ./configure \ --prefix=%{PHP_PREFIX} \ --with-libdir=${LIB_DIR} \ --with-pear \ --with-config-file-path=%{CONF_PREFIX} \ --with-apxs2=%{APXS_PATH} \ --with-oci8=instantclient,%{ORCL_PATH} \ --with-mysql \ --with-pgsql \ --enable-sockets \ --with-gd \ --enable-gd-native-ttf \ --with-freetype-dir \ --with-curl \ --with-bz2 \ --with-zlib-dir \ --enable-exif \ --with-ldap \ --with-gmp \ --with-xsl make clean make -j %install rm -rf $RPM_BUILD_ROOT # Don't try to change httpd.conf mv Makefile Makefile.bak sed -e "s:&& \$(mkinstalldirs) '\$(INSTALL_ROOT)/.\+' \(&& %{APXS_PATH} .\+\)-S SYSCONFDIR='.\+' \(.\+\)-a \(.\+\):\1\2\3:" Makefile.bak > Makefile # Install PHP to rpm staging area make INSTALL_ROOT=$RPM_BUILD_ROOT install # Modify *cmd.php to use correct include_path mv %{PEARCMD} %{PEARCMD}.bak mv %{PECLCMD} %{PECLCMD}.bak sed -e "s:'@'.'include_path'.'@':'%{PEAR_ROOT}':" %{PEARCMD}.bak > %{PEARCMD} sed -e "s:'@'.'include_path'.'@':'%{PEAR_ROOT}':" %{PECLCMD}.bak > %{PECLCMD} # Install PEAR packages to rpm staging area export PHP_PEAR_PHP_BIN="%{PHP_INSTALL}" export PHP_PEAR_INSTALL_DIR="%{PEAR_ROOT_INSTALL}" %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_oci8-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_pgsql-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_mysql-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Mail %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Mail_Mime %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Spreadsheet_Excel_Writer-beta # Revert *cmd.php mv %{PEARCMD}.bak %{PEARCMD} mv %{PECLCMD}.bak %{PECLCMD} %files %defattr(-,root,root) / %clean rm -rf $RPM_BUILD_DIR/php-%{version} $RPM_BUILD_ROOT Thanks for any help!
php
pear
rpm
null
null
null
open
RPM PHP and PEAR Packages === I'm trying to package a custom build of the latest PHP (5.3.3) with a set of pear packages. Unfortunately, the options given to do this don't seem to work. I'm posting the spec file as I see it should be. The version given doesn't actually fail, but it installs the PEAR packages in the wrong location. While they should go in /var/tmp/my_php-5.3.3-1-buildroot/usr/local/lib/php, but they end up in /var/tmp/my_php-5.3.3-1-buildroot/var/tmp/my_php-5.3.3-1-buildroot/usr/local/lib/php. You can also see where I had to hack the pearcmd.php script because it was completely ignoring the include_path setting the pear command passed it (derived from the PHP_PEAR_INSTALL_DIR environment variable). This could be completely wrong, but it's the only way I could get it to actually install anything at all. I have tried many other variations of this spec, but they all seem to "fail" in their own way. FYI, I've also tried using Pyrus, but it had similar issues (in addition to issues with non-PEAR2 packages). %define PHP_PREFIX /usr/local %define CONF_PREFIX /home/config/php/conf %define APXS_PATH /usr/local/apache2/bin/apxs %define ORCL_PATH /usr/local/lib/oracle %define PHP %{PHP_PREFIX}/bin/php %define PEAR %{PHP_PREFIX}/bin/pear %define PEAR_ROOT %{PHP_PREFIX}/lib/php %define PHP_INSTALL $RPM_BUILD_ROOT%{PHP} %define PEAR_INSTALL $RPM_BUILD_ROOT%{PEAR} %define PEAR_ROOT_INSTALL $RPM_BUILD_ROOT%{PEAR_ROOT} %define PEARCMD %{PEAR_ROOT_INSTALL}/pearcmd.php %define PECLCMD %{PEAR_ROOT_INSTALL}/peclcmd.php %define _unpackaged_files_terminate_build 0 Summary: my_php package Name: my_php Version: 5.3.3 Release: 1 License: The PHP License, Version 3.01 Vendor: Me Packager: Me <me@blah.com> Group: Development/Languages BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Source0: php-%{version}.tar.bz2 Requires: my_httpd >= 2.2.0, oracle-instantclient >= 10.2.0.4 BuildRequires: my_httpd >= 2.2.0 Conflicts: php, php5 %description PHP, My style %prep %setup -q -n php-%{version} %build LIB_DIR="lib" if [ "%{_arch}" == "x86_64" ]; then LIB_DIR="lib64" fi ./configure \ --prefix=%{PHP_PREFIX} \ --with-libdir=${LIB_DIR} \ --with-pear \ --with-config-file-path=%{CONF_PREFIX} \ --with-apxs2=%{APXS_PATH} \ --with-oci8=instantclient,%{ORCL_PATH} \ --with-mysql \ --with-pgsql \ --enable-sockets \ --with-gd \ --enable-gd-native-ttf \ --with-freetype-dir \ --with-curl \ --with-bz2 \ --with-zlib-dir \ --enable-exif \ --with-ldap \ --with-gmp \ --with-xsl make clean make -j %install rm -rf $RPM_BUILD_ROOT # Don't try to change httpd.conf mv Makefile Makefile.bak sed -e "s:&& \$(mkinstalldirs) '\$(INSTALL_ROOT)/.\+' \(&& %{APXS_PATH} .\+\)-S SYSCONFDIR='.\+' \(.\+\)-a \(.\+\):\1\2\3:" Makefile.bak > Makefile # Install PHP to rpm staging area make INSTALL_ROOT=$RPM_BUILD_ROOT install # Modify *cmd.php to use correct include_path mv %{PEARCMD} %{PEARCMD}.bak mv %{PECLCMD} %{PECLCMD}.bak sed -e "s:'@'.'include_path'.'@':'%{PEAR_ROOT}':" %{PEARCMD}.bak > %{PEARCMD} sed -e "s:'@'.'include_path'.'@':'%{PEAR_ROOT}':" %{PECLCMD}.bak > %{PECLCMD} # Install PEAR packages to rpm staging area export PHP_PEAR_PHP_BIN="%{PHP_INSTALL}" export PHP_PEAR_INSTALL_DIR="%{PEAR_ROOT_INSTALL}" %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_oci8-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_pgsql-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/MDB2_Driver_mysql-beta %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Mail %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Mail_Mime %{PEAR_INSTALL} install -P $RPM_BUILD_ROOT pear/Spreadsheet_Excel_Writer-beta # Revert *cmd.php mv %{PEARCMD}.bak %{PEARCMD} mv %{PECLCMD}.bak %{PECLCMD} %files %defattr(-,root,root) / %clean rm -rf $RPM_BUILD_DIR/php-%{version} $RPM_BUILD_ROOT Thanks for any help!
0
9,909,407
03/28/2012 14:16:14
695,697
04/06/2011 21:59:24
427
16
retrieving database result
Can someone explain why do we need to do `java: while rs.next()` , `php: while ($result = mysql_fetch_array)` ? How does programming languages retrieve data from database. What happens ? Why doesn't reveice the whole response ? I don't know but I really can't understant this , is way to nasty . I need a documentation not just "because they do that" Thanks
java
php
mysql
sql
null
03/28/2012 15:41:46
not a real question
retrieving database result === Can someone explain why do we need to do `java: while rs.next()` , `php: while ($result = mysql_fetch_array)` ? How does programming languages retrieve data from database. What happens ? Why doesn't reveice the whole response ? I don't know but I really can't understant this , is way to nasty . I need a documentation not just "because they do that" Thanks
1
11,468,929
07/13/2012 10:44:08
1,289,480
03/24/2012 03:28:56
6
0
Is there any way to find end tag in xml using vtd-xml
I have use token to loop all element based on the token count and see that in my xml structure, it has only token type = 5 and token type = 0 from this web http://vtd-xml.sourceforge.net/userGuide/6.html So is there a way to find ending tag in vtd-xml
xml
tags
vtd-xml
null
null
null
open
Is there any way to find end tag in xml using vtd-xml === I have use token to loop all element based on the token count and see that in my xml structure, it has only token type = 5 and token type = 0 from this web http://vtd-xml.sourceforge.net/userGuide/6.html So is there a way to find ending tag in vtd-xml
0
8,048,336
11/08/2011 09:33:34
1,021,661
10/31/2011 09:08:35
95
10
What is Association,Aggregation,Composition,Delegation,Realization,Dependency?
I am so confuse in "Association,Aggregation,Composition,Delegation,Realization,Dependency"... please explain these all terms in detail with example. Thanks in advance .. **Edited** I want to learn it from basic.
java
associations
composition
aggregation
delegation
11/08/2011 18:36:06
not constructive
What is Association,Aggregation,Composition,Delegation,Realization,Dependency? === I am so confuse in "Association,Aggregation,Composition,Delegation,Realization,Dependency"... please explain these all terms in detail with example. Thanks in advance .. **Edited** I want to learn it from basic.
4
11,495,329
07/15/2012 20:23:35
1,080,599
12/04/2011 22:29:33
22
0
Is there an open source Q&A platform similar to stackoverflow?
I need a good open source Q&A platform to boost collective intelligence of my community. The stackoverflow workflow is perfect for me. Do you know of any similar platform?
platform
null
null
null
null
07/15/2012 20:29:34
off topic
Is there an open source Q&A platform similar to stackoverflow? === I need a good open source Q&A platform to boost collective intelligence of my community. The stackoverflow workflow is perfect for me. Do you know of any similar platform?
2

Dataset Card for "stackoverflow-open-status-classification"

More Information needed

Downloads last month
0
Edit dataset card