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
10,323,818
04/25/2012 21:06:52
1,357,234
04/25/2012 21:04:33
1
0
Going to start a project for android during the summer.Looking for advice,resources,etc before i start
So I have decided to develop an app for android during the summer.I want to do it because i have never really taken on a full project like it and i would enjoy it.But also in the coming year or two in college,there may be recruiters that come and talk to the students.And i would love to have a full finished project so i can say "LOOK I MADE THIS HIRE ME". So as for the app,just so you have an idea of the scale of the project.It will essentially be an app for tracking your jogging times.(i know this is hardly a new idea but this is my first project after only two semesters of java)You will create a "journy",name it,give the distance etc.You can create multiple journys.And in the journys you will run a stopwatch and it will store your time when finished.You will be able to look at your current week and months average time.And each time you submit a time you will be told your time and whether you are improving or not,km/h etc. Hopefully i would like all your times displayed in a certain way.Once you have created your journy,you should be able to click it and view a calender of current and previous months,with the times you ran under the days you ran them. I am still thinking about the actual design of all these features. But i have some questions for anyone here experienced in android development. 1:What in your opinion, is the best forum/resource available for android development? 2:Android versions.The phone i will be getting and therefore doing the initial testing on will be 2.3 gingerbread.Should i be developing for a lower version android to ensure compatability on more phones?Will developing for a lower version limit the things i can do code wise? And any further advice you have for taking on my first project i would appreciate:)Thanks alot
java
android
null
null
null
04/26/2012 23:02:16
not constructive
Going to start a project for android during the summer.Looking for advice,resources,etc before i start === So I have decided to develop an app for android during the summer.I want to do it because i have never really taken on a full project like it and i would enjoy it.But also in the coming year or two in college,there may be recruiters that come and talk to the students.And i would love to have a full finished project so i can say "LOOK I MADE THIS HIRE ME". So as for the app,just so you have an idea of the scale of the project.It will essentially be an app for tracking your jogging times.(i know this is hardly a new idea but this is my first project after only two semesters of java)You will create a "journy",name it,give the distance etc.You can create multiple journys.And in the journys you will run a stopwatch and it will store your time when finished.You will be able to look at your current week and months average time.And each time you submit a time you will be told your time and whether you are improving or not,km/h etc. Hopefully i would like all your times displayed in a certain way.Once you have created your journy,you should be able to click it and view a calender of current and previous months,with the times you ran under the days you ran them. I am still thinking about the actual design of all these features. But i have some questions for anyone here experienced in android development. 1:What in your opinion, is the best forum/resource available for android development? 2:Android versions.The phone i will be getting and therefore doing the initial testing on will be 2.3 gingerbread.Should i be developing for a lower version android to ensure compatability on more phones?Will developing for a lower version limit the things i can do code wise? And any further advice you have for taking on my first project i would appreciate:)Thanks alot
4
2,580,381
04/05/2010 18:54:33
282,848
02/27/2010 21:42:36
409
16
The Coolest Parts of Windows API
I have noticed that there are quite a few community wikis about "Tips & Tricks" or "Hidden Features" in programming languages and APIs here at Stack Overflow. But I could not find any about my own personal favourites: Win32 API and Delphi. Therefore I start my "own" CW about Win32 API. There are (at least) two kinds of Win API users: those that have been brought up using Windows API in C/C++, and those that have been brought up using some level of abstraction above the Windows API. I belong to the latter category, being brought up using Delphi's VCL. But over the last five years, I have become increasingly interested in the underlaying API of the Windows operating system, and today I work a lot with it. Depending on which category a programmer belongs to, he (or possibly she) will think that different things are "cool" in the Windows API. For instance, whereas a VCL-brought up developer might think it it very cool to var errIcon: HICON; begin errIcon := LoadIcon(0, IDI_ERROR); DrawIcon(Canvas.Handle, 10, 10, errIcon), a programmer brought up using Windows API in C will not be as impressed. But no matter how you are "brought up": what are the coolest "tricks" in Windows API? I start by listing a few of my own favourites, some of which are more "cool" than "useful", though: - `LoadIcon` and `MessageBeep` can load/play system default icons and sounds. - Open the CD tray: `mciSendString('Set cdaudio door open wait', nil, 0, 0);` - Fade out the screen (Windows Vista and later) and turn of the monitor: `SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2);` - `GetWindowDC(GetDesktopWindow)` returns the DC of the desktop.
winapi
tips-and-tricks
null
null
null
03/04/2012 05:34:03
not constructive
The Coolest Parts of Windows API === I have noticed that there are quite a few community wikis about "Tips & Tricks" or "Hidden Features" in programming languages and APIs here at Stack Overflow. But I could not find any about my own personal favourites: Win32 API and Delphi. Therefore I start my "own" CW about Win32 API. There are (at least) two kinds of Win API users: those that have been brought up using Windows API in C/C++, and those that have been brought up using some level of abstraction above the Windows API. I belong to the latter category, being brought up using Delphi's VCL. But over the last five years, I have become increasingly interested in the underlaying API of the Windows operating system, and today I work a lot with it. Depending on which category a programmer belongs to, he (or possibly she) will think that different things are "cool" in the Windows API. For instance, whereas a VCL-brought up developer might think it it very cool to var errIcon: HICON; begin errIcon := LoadIcon(0, IDI_ERROR); DrawIcon(Canvas.Handle, 10, 10, errIcon), a programmer brought up using Windows API in C will not be as impressed. But no matter how you are "brought up": what are the coolest "tricks" in Windows API? I start by listing a few of my own favourites, some of which are more "cool" than "useful", though: - `LoadIcon` and `MessageBeep` can load/play system default icons and sounds. - Open the CD tray: `mciSendString('Set cdaudio door open wait', nil, 0, 0);` - Fade out the screen (Windows Vista and later) and turn of the monitor: `SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2);` - `GetWindowDC(GetDesktopWindow)` returns the DC of the desktop.
4
6,901,740
08/01/2011 16:50:32
846,089
07/15/2011 08:41:46
4
0
How to installed android sdk in ubuntu 9.04?
I am new in ubuntu installation any package? so Now , I want to develop android apps in ubuntu so what is the procedure to install android skd, jdk6 and eclipse indigo ? please give me suggestion what to do.
android
eclipse
ubuntu
openjdk
null
08/01/2011 20:29:37
too localized
How to installed android sdk in ubuntu 9.04? === I am new in ubuntu installation any package? so Now , I want to develop android apps in ubuntu so what is the procedure to install android skd, jdk6 and eclipse indigo ? please give me suggestion what to do.
3
8,506,111
12/14/2011 14:28:53
1,061,955
11/23/2011 13:03:58
53
5
Introduction to new training resources, web programming technologies
at before I created windows form application on the **c#.net 2010** (lan network) i worked with **sqlserver2008** and **linqtosql** and **lambda expersions** but at now I want to start Learning skills in web development please Introduce me, new technologies web programming and Introduce me to training resources, web programming technologies ;-( sorry for bad language
javascript
jquery
asp.net
html
web
12/15/2011 00:46:11
not a real question
Introduction to new training resources, web programming technologies === at before I created windows form application on the **c#.net 2010** (lan network) i worked with **sqlserver2008** and **linqtosql** and **lambda expersions** but at now I want to start Learning skills in web development please Introduce me, new technologies web programming and Introduce me to training resources, web programming technologies ;-( sorry for bad language
1
3,573,960
08/26/2010 09:53:14
130,909
06/30/2009 08:27:00
98
7
Parsing big XML file with SAX parser, the class is becoming bloated and unreadable - How to fix this ?
This is purely a code readability related question, the performance of the class is not an issue. Here is how I am building this XMLHandler : For each element that is relevant to the application, I have a boolean in'ElementName' which I set to true or false depending on my location during the parsing : Problem, I now have 10+ boolean declaration at the beginning of my class and it is getting bigger and bigger. In my startElement and in my endElement method, I have hundreds of line of if (qName = "elementName") { ... } else if (qName = "anotherElementName") { ... } with different parsing rules in them (if I am in this position in the xml file, do this, otherwise, do this etc...) Coding new parsing rules and debugging is becoming increasingly painfull. What are the best practices for coding a sax parser, and what can I do to make my code more readable ?
java
saxparser
code-readability
null
null
null
open
Parsing big XML file with SAX parser, the class is becoming bloated and unreadable - How to fix this ? === This is purely a code readability related question, the performance of the class is not an issue. Here is how I am building this XMLHandler : For each element that is relevant to the application, I have a boolean in'ElementName' which I set to true or false depending on my location during the parsing : Problem, I now have 10+ boolean declaration at the beginning of my class and it is getting bigger and bigger. In my startElement and in my endElement method, I have hundreds of line of if (qName = "elementName") { ... } else if (qName = "anotherElementName") { ... } with different parsing rules in them (if I am in this position in the xml file, do this, otherwise, do this etc...) Coding new parsing rules and debugging is becoming increasingly painfull. What are the best practices for coding a sax parser, and what can I do to make my code more readable ?
0
9,245,667
02/12/2012 01:34:32
1,071,892
11/29/2011 17:59:19
22
1
Serializing Multiple Objects to a File in PHP, can't unserialize?
Using PHP 5.3.8. I'm attempting to implement two functions, `save($adoption)` which serializes an `Adoption` instance, appends a delimiter, then appends it to the end of a text file, and `loadAdoptions()`, which opens the text file, `explode()`s the contents on the delimiter, and `unserialize()`s each object in a for loop through the contents of the array `explode()` returned then calls `Display()` on them. Here's the shortest form reproducing my problem: http://pastebin.com/6RBTtR8R On line 38, where `Display()` is called, `Fatal error: Call to a member function Display() on a non-object`
php
serialization
null
null
null
null
open
Serializing Multiple Objects to a File in PHP, can't unserialize? === Using PHP 5.3.8. I'm attempting to implement two functions, `save($adoption)` which serializes an `Adoption` instance, appends a delimiter, then appends it to the end of a text file, and `loadAdoptions()`, which opens the text file, `explode()`s the contents on the delimiter, and `unserialize()`s each object in a for loop through the contents of the array `explode()` returned then calls `Display()` on them. Here's the shortest form reproducing my problem: http://pastebin.com/6RBTtR8R On line 38, where `Display()` is called, `Fatal error: Call to a member function Display() on a non-object`
0
3,053,416
06/16/2010 12:58:19
1,094,466
12/21/2009 15:56:26
1
2
Apache Rewrite - put parts of query string in replacement string
I'd like to rewrite: www.example.com/file.html?username=john&number=1234 To: www.example.com/users/john But I can't figure out how to extract the "username" value from the query string. I've been Googling this all morning and reading the official docs but no luck. I need to solve this problem with a rewrite, rather than changing the application. Any help much appreciated! Rangi
apache
mod-rewrite
rewrite
null
null
null
open
Apache Rewrite - put parts of query string in replacement string === I'd like to rewrite: www.example.com/file.html?username=john&number=1234 To: www.example.com/users/john But I can't figure out how to extract the "username" value from the query string. I've been Googling this all morning and reading the official docs but no luck. I need to solve this problem with a rewrite, rather than changing the application. Any help much appreciated! Rangi
0
9,865,362
03/26/2012 00:48:22
656,925
08/12/2010 02:22:36
2,010
48
How do I use the google API?
I need to use http://code.google.com/apis/customsearch/v1/reference.html#method_search_cse_list to pull the site title given a url. I found this info. from a previous post [here.][1] Problem is I don't know where to begin...on using the API. Can someone provide a link or an example. What' I'm trying to do is relatively simple...it is just I've never used and API like this before. I found the property I need. items[].title but what code do I use to populate it? Thanks [1]: http://stackoverflow.com/questions/9856544/how-do-i-match-a-site-url-to-the-site-title
javascript
null
null
null
null
03/26/2012 00:58:02
not a real question
How do I use the google API? === I need to use http://code.google.com/apis/customsearch/v1/reference.html#method_search_cse_list to pull the site title given a url. I found this info. from a previous post [here.][1] Problem is I don't know where to begin...on using the API. Can someone provide a link or an example. What' I'm trying to do is relatively simple...it is just I've never used and API like this before. I found the property I need. items[].title but what code do I use to populate it? Thanks [1]: http://stackoverflow.com/questions/9856544/how-do-i-match-a-site-url-to-the-site-title
1
7,525,315
09/23/2011 06:54:58
959,991
09/22/2011 20:53:32
1
0
want to create a Dayanamic formula creater in PHP
i want to make a dayanamic formula creater in which user saves his formula in a varriable and this varriable will hav to show in other dropdown list .when we select the formula name from the dropdown list there should be all the fields would be displayed which he had given in the formula nd after that just evaluate the string... how can i make this in PHp
php
null
null
null
null
09/23/2011 07:37:46
not a real question
want to create a Dayanamic formula creater in PHP === i want to make a dayanamic formula creater in which user saves his formula in a varriable and this varriable will hav to show in other dropdown list .when we select the formula name from the dropdown list there should be all the fields would be displayed which he had given in the formula nd after that just evaluate the string... how can i make this in PHp
1
5,459,473
03/28/2011 13:12:58
671,286
03/22/2011 13:32:49
3
0
add categories and sub categories in php
in admin panel admin can add a product category and it has sub category and sub category has another sub category these categories stored in database in the format field of 'main','sub','sub-sub'.i want code for this .help your friend
php
mysql
null
null
null
03/28/2011 14:49:02
not a real question
add categories and sub categories in php === in admin panel admin can add a product category and it has sub category and sub category has another sub category these categories stored in database in the format field of 'main','sub','sub-sub'.i want code for this .help your friend
1
1,100,632
07/08/2009 21:29:37
46,011
12/13/2008 19:05:05
1,153
44
Understanding programming for non-programmers?
Is there a book or an article online somewhere that can explain all the perils of programming without any technical jargon for non-programmers? The managers in the company I work for know nothing about what it takes to write a good program. I want them to understand why best practices like DRY and encapsalation are so important, and that programming is more than just writing code but architecting, and that just because a program looks complete doesn't mean its ready for launch. I can try to explain this to them but I find it very hard to explain to people that have no understanding of programming. Even if I could explain it, I have coworkers who do things the wrong way and argue that I am just preaching my personal preference. It would be much more convincing for them to read it from a published book. So is there a book I can buy and have my managers read so they understand?
non-technical
management
null
null
null
02/09/2012 14:16:49
not constructive
Understanding programming for non-programmers? === Is there a book or an article online somewhere that can explain all the perils of programming without any technical jargon for non-programmers? The managers in the company I work for know nothing about what it takes to write a good program. I want them to understand why best practices like DRY and encapsalation are so important, and that programming is more than just writing code but architecting, and that just because a program looks complete doesn't mean its ready for launch. I can try to explain this to them but I find it very hard to explain to people that have no understanding of programming. Even if I could explain it, I have coworkers who do things the wrong way and argue that I am just preaching my personal preference. It would be much more convincing for them to read it from a published book. So is there a book I can buy and have my managers read so they understand?
4
10,665,447
05/19/2012 13:05:33
233,798
12/17/2009 13:28:11
443
1
Why would a webapp need a server online for only a few hours?
EC2, RDS charge by the number of hours online, but who would actually benefit from this kind of tariff? Why would a webapp need a server online for only a few hours a day/week/etc.?
amazon-s3
amazon-ec2
amazon-web-services
null
null
05/24/2012 11:46:45
off topic
Why would a webapp need a server online for only a few hours? === EC2, RDS charge by the number of hours online, but who would actually benefit from this kind of tariff? Why would a webapp need a server online for only a few hours a day/week/etc.?
2
2,575,952
04/04/2010 21:23:32
269,857
02/09/2010 21:41:53
127
1
Beginner problems with references to arrays in python 3.1.1
As part of the last assignment in a beginner python programing class, I have been assigned a traveling sales man problem. I settled on a recursive function to find each permutation and the sum of the distances between the destinations, however, I am have a lot of problems with references. Arrays in different instances of the Permute and Main functions of TSP seem to be pointing to the same reference. from math import sqrt class TSP: def __init__(self): self.CartisianCoordinates = [['A',[1,1]], ['B',[2,2]], ['C',[2,1]], ['D',[1,2]], ['E',[3,3]]] self.Array = [] self.Max = 0 self.StoredList = ['',0] def Distance(self, i1, i2): x1 = self.CartisianCoordinates[i1][1][0] y1 = self.CartisianCoordinates[i1][1][1] x2 = self.CartisianCoordinates[i2][1][0] y2 = self.CartisianCoordinates[i2][1][1] return sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)) def Evaluate(self): temparray = [] Data = [] for i in range(len(self.CartisianCoordinates)): Data.append([]) for i1 in range(len(self.CartisianCoordinates)): for i2 in range(len(self.CartisianCoordinates)): if i1 != i2: temparray.append(self.Distance(i1, i2)) else: temparray.append('X') Data[i1] = temparray temparray = [] self.Array = Data self.Max = len(Data) def Permute(self,varray,index,vcarry,mcarry): #Problem Class array = varray[:] carry = vcarry[:] for i in range(self.Max): print ('ARRAY:', array) print (index,i,carry,array[index][i]) if array[index][i] != 'X': carry[0] += self.CartisianCoordinates[i][0] carry[1] += array[index][i] if len(carry) != self.Max: temparray = array[:] for j in range(self.Max):temparray[j][i] = 'X' index = i mcarry += self.Permute(temparray,index,carry,mcarry) else: return mcarry print ('pass',mcarry) return mcarry def Main(self): out = [] self.Evaluate() for i in range(self.Max): array = self.Array[:] #array appears to maintain the same reference after each copy, resulting in an incorrect array being passed to Permute after the first iteration. print (self.Array[:]) for j in range(self.Max):array[j][i] = 'X' print('I:', i, array) out.append(self.Permute(array,i,[str(self.CartisianCoordinates[i][0]),0],[])) return out SalesPerson = TSP() print(SalesPerson.Main()) It would be greatly appreciated if you could provide me with help in solving the reference problems I am having. Thank you.
python
homework
null
null
null
null
open
Beginner problems with references to arrays in python 3.1.1 === As part of the last assignment in a beginner python programing class, I have been assigned a traveling sales man problem. I settled on a recursive function to find each permutation and the sum of the distances between the destinations, however, I am have a lot of problems with references. Arrays in different instances of the Permute and Main functions of TSP seem to be pointing to the same reference. from math import sqrt class TSP: def __init__(self): self.CartisianCoordinates = [['A',[1,1]], ['B',[2,2]], ['C',[2,1]], ['D',[1,2]], ['E',[3,3]]] self.Array = [] self.Max = 0 self.StoredList = ['',0] def Distance(self, i1, i2): x1 = self.CartisianCoordinates[i1][1][0] y1 = self.CartisianCoordinates[i1][1][1] x2 = self.CartisianCoordinates[i2][1][0] y2 = self.CartisianCoordinates[i2][1][1] return sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)) def Evaluate(self): temparray = [] Data = [] for i in range(len(self.CartisianCoordinates)): Data.append([]) for i1 in range(len(self.CartisianCoordinates)): for i2 in range(len(self.CartisianCoordinates)): if i1 != i2: temparray.append(self.Distance(i1, i2)) else: temparray.append('X') Data[i1] = temparray temparray = [] self.Array = Data self.Max = len(Data) def Permute(self,varray,index,vcarry,mcarry): #Problem Class array = varray[:] carry = vcarry[:] for i in range(self.Max): print ('ARRAY:', array) print (index,i,carry,array[index][i]) if array[index][i] != 'X': carry[0] += self.CartisianCoordinates[i][0] carry[1] += array[index][i] if len(carry) != self.Max: temparray = array[:] for j in range(self.Max):temparray[j][i] = 'X' index = i mcarry += self.Permute(temparray,index,carry,mcarry) else: return mcarry print ('pass',mcarry) return mcarry def Main(self): out = [] self.Evaluate() for i in range(self.Max): array = self.Array[:] #array appears to maintain the same reference after each copy, resulting in an incorrect array being passed to Permute after the first iteration. print (self.Array[:]) for j in range(self.Max):array[j][i] = 'X' print('I:', i, array) out.append(self.Permute(array,i,[str(self.CartisianCoordinates[i][0]),0],[])) return out SalesPerson = TSP() print(SalesPerson.Main()) It would be greatly appreciated if you could provide me with help in solving the reference problems I am having. Thank you.
0
11,300,853
07/02/2012 20:41:32
1,497,079
07/02/2012 20:10:57
1
0
What can be used for a website that searches other websites?
What I want to do is to have a search bar where users write in search criteria and my "webbot" shall then take that and look it up on a few specified websites and extract some relevant information from the pages it finds in these websites and display them on my site. Would you use a webbot for this or are there other possibilities?
web
bots
null
null
null
07/03/2012 03:31:16
not a real question
What can be used for a website that searches other websites? === What I want to do is to have a search bar where users write in search criteria and my "webbot" shall then take that and look it up on a few specified websites and extract some relevant information from the pages it finds in these websites and display them on my site. Would you use a webbot for this or are there other possibilities?
1
10,062,530
04/08/2012 11:40:28
1,044,564
11/13/2011 20:27:48
1
0
Trouble with MySQL Server 5.5 installation
I have installed Mysql server 5.5 on my system for a php-mysql related database project. The thing is that somehow the server installation is not being done properly. The server is working fine as long is the system is on , but when exit the mysql server and then shut down my system , and switch it on again - the server does not work. I go to the MySql command line 5.5 and double click on it i get an error screen which vanishes even before i can read what the error is and i have to uninstall and re-install the server again. I have to have this project ready in the net 15 days - can somebody please tell me what the problem is and how it can be solved Thanks Soumya
mysql
installation
null
null
null
04/09/2012 14:06:07
off topic
Trouble with MySQL Server 5.5 installation === I have installed Mysql server 5.5 on my system for a php-mysql related database project. The thing is that somehow the server installation is not being done properly. The server is working fine as long is the system is on , but when exit the mysql server and then shut down my system , and switch it on again - the server does not work. I go to the MySql command line 5.5 and double click on it i get an error screen which vanishes even before i can read what the error is and i have to uninstall and re-install the server again. I have to have this project ready in the net 15 days - can somebody please tell me what the problem is and how it can be solved Thanks Soumya
2
11,063,623
06/16/2012 12:55:27
1,460,604
06/16/2012 12:24:26
1
0
solve an equation containing three unknown prime no's
I was recently asked a question in an interview & have been unable to crack it , after my own efforts have failed & google not showing any results , i am posting it here so that anyone else may also try their hand on it . *Given the equation a(a+b)=c-120 , where a,b& c are unequal prime no's. Find a,b & c.* I know I must use some property of the prime numbers to reduce the problem to a simpler one , but i cant think of one. Any suggestions/solutions will be appreciated. Thanks
interview-questions
primes
equation
null
null
06/16/2012 20:59:20
off topic
solve an equation containing three unknown prime no's === I was recently asked a question in an interview & have been unable to crack it , after my own efforts have failed & google not showing any results , i am posting it here so that anyone else may also try their hand on it . *Given the equation a(a+b)=c-120 , where a,b& c are unequal prime no's. Find a,b & c.* I know I must use some property of the prime numbers to reduce the problem to a simpler one , but i cant think of one. Any suggestions/solutions will be appreciated. Thanks
2
10,599,180
05/15/2012 10:50:45
1,319,282
04/07/2012 15:53:21
6
0
Email Newsletter HTML: Table Cellspacing in Gmail Viewed in IE
I just realized while checking around, the `<table cellspacing='10'> </table>` doesn't work when I view my gmail in IE (I am using IE9). But using FF or Chrome, its fine. I use my IE to view my hotmail and yahoo account that has the same newsletter, it has cellspacing just fine, so what happen to my IE when viewing my gmail acccount newsletter? Any clue?
html
internet-explorer
email
table
cellspacing
null
open
Email Newsletter HTML: Table Cellspacing in Gmail Viewed in IE === I just realized while checking around, the `<table cellspacing='10'> </table>` doesn't work when I view my gmail in IE (I am using IE9). But using FF or Chrome, its fine. I use my IE to view my hotmail and yahoo account that has the same newsletter, it has cellspacing just fine, so what happen to my IE when viewing my gmail acccount newsletter? Any clue?
0
7,178,875
08/24/2011 16:20:46
393,639
07/16/2010 08:51:27
146
8
Why PHP MySql connection do not work?
I'm using MySQL given from A2Hosting. There I can create users and add them to databases. And i hosted my php codes inside web folder in symphony php structure. I dont want to use any symphony commands or functions. I have my own php calls to DB. But my Php codes gives the following error. But the user names and passwords are correct. Query failed : Access denied for user 'games_user'@'localhost' to database 'games'
php
mysql
symfony
null
null
null
open
Why PHP MySql connection do not work? === I'm using MySQL given from A2Hosting. There I can create users and add them to databases. And i hosted my php codes inside web folder in symphony php structure. I dont want to use any symphony commands or functions. I have my own php calls to DB. But my Php codes gives the following error. But the user names and passwords are correct. Query failed : Access denied for user 'games_user'@'localhost' to database 'games'
0
9,757,005
03/18/2012 08:27:12
1,233,522
02/26/2012 07:31:45
1
0
Insert Image into mysql database through Jsp
Can any one provide the code for insert image in mysql through JSp page. Malik Thanks
java
null
null
null
null
03/18/2012 08:47:07
not a real question
Insert Image into mysql database through Jsp === Can any one provide the code for insert image in mysql through JSp page. Malik Thanks
1
3,192,547
07/07/2010 06:55:12
304,151
03/29/2010 11:29:49
307
7
What encoding does the unicode function in BeautifulSoup convert from?
When I use the `unicode` function in BeautifulSoup - what encoding does it convert to Unicode from? Does it automatically use the `soup.originalEncoding`? from BeautifulSoup import BeautifulSoup doc = "<html><h1>Heading</h1><p>Text" soup = BeautifulSoup(doc) print unicode(soup) Thanks
python
beautifulsoup
null
null
null
null
open
What encoding does the unicode function in BeautifulSoup convert from? === When I use the `unicode` function in BeautifulSoup - what encoding does it convert to Unicode from? Does it automatically use the `soup.originalEncoding`? from BeautifulSoup import BeautifulSoup doc = "<html><h1>Heading</h1><p>Text" soup = BeautifulSoup(doc) print unicode(soup) Thanks
0
7,936,519
10/29/2011 02:03:13
1,016,416
10/27/2011 11:59:52
6
0
PHP, new variable class in namespace
I'm experimenting with PHP 5.3's namespacing functionality and I just can't figure out how to instantiate a new class with namespace prefixing. This currently works fine: <?php new $className($args); ?> But how I can prepend my namespace in front of a variable classname? The following example doesn't work. <?php new My\Namespace\$className($args); ?> This example yields: **Parse error: syntax error, unexpected T_VARIABLE**
php
oop
php5
namespaces
null
null
open
PHP, new variable class in namespace === I'm experimenting with PHP 5.3's namespacing functionality and I just can't figure out how to instantiate a new class with namespace prefixing. This currently works fine: <?php new $className($args); ?> But how I can prepend my namespace in front of a variable classname? The following example doesn't work. <?php new My\Namespace\$className($args); ?> This example yields: **Parse error: syntax error, unexpected T_VARIABLE**
0
7,989,852
11/03/2011 03:10:04
1,026,892
11/03/2011 02:47:34
1
0
What is best architecture to store huge videos and lot log file with processed data?
It is a research project. We will record lot videos everyday, and metadata with log data would be saved in semantic model, RDF or OWL. The video would be used to download or processed on server.Everyday we would add lot data. What is the best storage solution? Some Options 1. use the Hbase. the binary files would be stored in HDFS. Hbase supportw semantic well. 2. use HDFS + Neo4j. Neo4j is just for semantic mode. So we just record the binary file's path in the RDF or OWL file. Then Java would process the logic. 3. Lustre+ Hbase or Neo4j. The Lustre would store the large video files, and Hbase/Neo4j is used for semantic data. What is the Best one, or some better solution. Thanks
hadoop
semantic
hbase
neo4j
null
11/03/2011 10:26:35
not constructive
What is best architecture to store huge videos and lot log file with processed data? === It is a research project. We will record lot videos everyday, and metadata with log data would be saved in semantic model, RDF or OWL. The video would be used to download or processed on server.Everyday we would add lot data. What is the best storage solution? Some Options 1. use the Hbase. the binary files would be stored in HDFS. Hbase supportw semantic well. 2. use HDFS + Neo4j. Neo4j is just for semantic mode. So we just record the binary file's path in the RDF or OWL file. Then Java would process the logic. 3. Lustre+ Hbase or Neo4j. The Lustre would store the large video files, and Hbase/Neo4j is used for semantic data. What is the Best one, or some better solution. Thanks
4
3,869,799
10/06/2010 05:50:23
438,624
09/03/2010 04:57:03
13
5
Can you explain the logic of Tower of Hanoi
Can u please explain Tower of Hanoi Logic?
c#
null
null
null
null
10/06/2010 06:00:21
off topic
Can you explain the logic of Tower of Hanoi === Can u please explain Tower of Hanoi Logic?
2
11,324,136
07/04/2012 07:14:08
1,499,157
07/03/2012 14:50:18
1
0
Hindu astrology plugin or api for php
Friends can anyone help me with suggesting the free api or plugin to generate hindu horoscopes in brief using php. Thanks in advance.
php
api
plugins
null
null
07/04/2012 19:50:54
not constructive
Hindu astrology plugin or api for php === Friends can anyone help me with suggesting the free api or plugin to generate hindu horoscopes in brief using php. Thanks in advance.
4
11,199,147
06/26/2012 00:11:23
770,358
05/25/2011 21:22:55
180
4
No such user here, can't receive emails from the site
I just put one website live eg www.example.com, everything is working fine but when you send a contact form to the client's email sales@example.com, the email doesn't go through. It came back with an error saying "No Such User Here" I changed the contact form receiving address to my yahoo email and my work email, both received the contact form no problem. Initially I thought their email provider must recognise it as spam, but I just heard back they said it is our server issue. They mentioned about DNS and MX record. Where abouts in Cpanel can I find that record? Can someone please share some light on how come the only emails with @example.com not receive any emails from the site? Any way to fix this? Thanks very much. S
php
email
dns
cpanel
null
06/26/2012 06:28:56
off topic
No such user here, can't receive emails from the site === I just put one website live eg www.example.com, everything is working fine but when you send a contact form to the client's email sales@example.com, the email doesn't go through. It came back with an error saying "No Such User Here" I changed the contact form receiving address to my yahoo email and my work email, both received the contact form no problem. Initially I thought their email provider must recognise it as spam, but I just heard back they said it is our server issue. They mentioned about DNS and MX record. Where abouts in Cpanel can I find that record? Can someone please share some light on how come the only emails with @example.com not receive any emails from the site? Any way to fix this? Thanks very much. S
2
5,460,064
03/28/2011 13:59:20
672,612
03/23/2011 08:04:48
1
0
Serviceclient problem invoking operations which have extended classes as parameters
Serviceclient problem invoking operations which have extended classes as parameters I have operation input that have exteded class xsd:shema SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = fac.getDefaultEnvelope(); OMNamespace omNs = fac.createOMNamespace( "http://impl.service.mobile.boerse.com/", "impl"); // // creating the payload OMElement method = fac.createOMElement("getIndexData", omNs); OMElement value = fac.createOMElement("arg0.deviceType", omNs); value.setText("1"); method.addChild(value); OMElement value2 = fac.createOMElement("arg0.identificationID", omNs); value2.setText("1"); method.addChild(value2); OMElement value4 = fac.createOMElement("arg0.name", omNs); value4.setText("1"); method.addChild(value4); OMElement value3 = fac.createOMElement("arg1", omNs); value3.setText("1"); method.addChild(value3); envelope.getBody().addChild(method); where is wrong
class
axis2
message
invoke
extended
null
open
Serviceclient problem invoking operations which have extended classes as parameters === Serviceclient problem invoking operations which have extended classes as parameters I have operation input that have exteded class xsd:shema SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = fac.getDefaultEnvelope(); OMNamespace omNs = fac.createOMNamespace( "http://impl.service.mobile.boerse.com/", "impl"); // // creating the payload OMElement method = fac.createOMElement("getIndexData", omNs); OMElement value = fac.createOMElement("arg0.deviceType", omNs); value.setText("1"); method.addChild(value); OMElement value2 = fac.createOMElement("arg0.identificationID", omNs); value2.setText("1"); method.addChild(value2); OMElement value4 = fac.createOMElement("arg0.name", omNs); value4.setText("1"); method.addChild(value4); OMElement value3 = fac.createOMElement("arg1", omNs); value3.setText("1"); method.addChild(value3); envelope.getBody().addChild(method); where is wrong
0
10,687,890
05/21/2012 15:11:22
456,850
09/24/2010 02:36:54
605
8
Ajax in Form Input Not Appearing in Submit
I'm having a problem where I am using JQuery to add input into form after it has created. The initial form looks like this: <form class="purchase-product" > <div id="purchase_quantity_discounts"></div> <input type="hidden" name="product_id" value="1" id="label" > <input type"button" name "submitme" id="product-quantity-button"></button> </form> And the JQuery for appending $('#purchase_quantity_discounts').append('Quanity: </strong> <input type="text" name="quantity" placeholder="Enter Quantity" value="1" /'); Now I am trying to get the quanity: $('#' + purchase_page).on('click', '#product-quantity-button', function() { var formData = Utilities.parseForm(".purchase-product"); var amount = formData.quantity; var product_id = formData.product_id; alert(amount); alert(product_id); }); So the product_id always shows but the quantity never comes up. WHy is that and how do I fix it?
javascript
jquery
forms
null
null
05/22/2012 12:26:49
too localized
Ajax in Form Input Not Appearing in Submit === I'm having a problem where I am using JQuery to add input into form after it has created. The initial form looks like this: <form class="purchase-product" > <div id="purchase_quantity_discounts"></div> <input type="hidden" name="product_id" value="1" id="label" > <input type"button" name "submitme" id="product-quantity-button"></button> </form> And the JQuery for appending $('#purchase_quantity_discounts').append('Quanity: </strong> <input type="text" name="quantity" placeholder="Enter Quantity" value="1" /'); Now I am trying to get the quanity: $('#' + purchase_page).on('click', '#product-quantity-button', function() { var formData = Utilities.parseForm(".purchase-product"); var amount = formData.quantity; var product_id = formData.product_id; alert(amount); alert(product_id); }); So the product_id always shows but the quantity never comes up. WHy is that and how do I fix it?
3
6,176,438
05/30/2011 12:43:31
776,260
05/30/2011 12:43:31
1
0
about external table creation using asp.net
i wanted to create external table without using database,i want detailed procedure for creating external table using asp.net programming please help me. i have tried this code please check it and give me any tips using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DataTable avDaysTable = new DataTable(); DataTable avTimeTable = new DataTable(); DataSet ds = new DataSet(); SqlConnection sqlCon = new SqlConnection("data source=hobvision03;initial catalog=master;user id=sa;password=hobvision"); SqlCommand cmd = new SqlCommand("getdatetime", sqlCon); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter dAdapter = new SqlDataAdapter(cmd); dAdapter.Fill(ds); avDaysTable = ds.Tables[0]; avTimeTable = ds.Tables[1]; int columnCount = avTimeTable.Rows.Count; TableItemStyle tableStyle = new TableItemStyle(); tableStyle.HorizontalAlign = HorizontalAlign.Center; tableStyle.VerticalAlign = VerticalAlign.Middle; tableStyle.Width = Unit.Pixel(100); tableStyle.CssClass = "button-editable-heading"; TableRow headerrow; TableCell headerCell; headerCell = new TableCell(); headerCell.Text = ""; headerrow = new TableRow(); headerrow.Cells.Add(headerCell); for (int i = 0; i < avTimeTable.Rows.Count; i++) { headerCell = new TableCell(); headerCell.Text = avTimeTable.Rows[i][1].ToString(); headerrow.Cells.Add(headerCell); } headerrow.ApplyStyle(tableStyle); MyTable.Rows.Add(headerrow); CheckBox chk; for (int i = 0; i < avDaysTable.Rows.Count; i++) { //add rows to first column headerrow = new TableRow(); headerrow.ID = i.ToString(); headerCell = new TableCell(); headerCell.Text = avDaysTable.Rows[i][1].ToString(); headerCell.ApplyStyle(tableStyle); headerrow.Cells.Add(headerCell); for (int j = 0; j < avTimeTable.Rows.Count; j++) { headerCell = new TableCell(); chk = new CheckBox(); chk.ID = "chk" + i.ToString() + j.ToString(); ; headerCell.Controls.Add(chk); headerrow.Cells.Add(headerCell); } MyTable.Rows.Add(headerrow); } MyTable.Rows.Add(headerrow); } }
asp.net
null
null
null
null
05/31/2011 19:59:42
not a real question
about external table creation using asp.net === i wanted to create external table without using database,i want detailed procedure for creating external table using asp.net programming please help me. i have tried this code please check it and give me any tips using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DataTable avDaysTable = new DataTable(); DataTable avTimeTable = new DataTable(); DataSet ds = new DataSet(); SqlConnection sqlCon = new SqlConnection("data source=hobvision03;initial catalog=master;user id=sa;password=hobvision"); SqlCommand cmd = new SqlCommand("getdatetime", sqlCon); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter dAdapter = new SqlDataAdapter(cmd); dAdapter.Fill(ds); avDaysTable = ds.Tables[0]; avTimeTable = ds.Tables[1]; int columnCount = avTimeTable.Rows.Count; TableItemStyle tableStyle = new TableItemStyle(); tableStyle.HorizontalAlign = HorizontalAlign.Center; tableStyle.VerticalAlign = VerticalAlign.Middle; tableStyle.Width = Unit.Pixel(100); tableStyle.CssClass = "button-editable-heading"; TableRow headerrow; TableCell headerCell; headerCell = new TableCell(); headerCell.Text = ""; headerrow = new TableRow(); headerrow.Cells.Add(headerCell); for (int i = 0; i < avTimeTable.Rows.Count; i++) { headerCell = new TableCell(); headerCell.Text = avTimeTable.Rows[i][1].ToString(); headerrow.Cells.Add(headerCell); } headerrow.ApplyStyle(tableStyle); MyTable.Rows.Add(headerrow); CheckBox chk; for (int i = 0; i < avDaysTable.Rows.Count; i++) { //add rows to first column headerrow = new TableRow(); headerrow.ID = i.ToString(); headerCell = new TableCell(); headerCell.Text = avDaysTable.Rows[i][1].ToString(); headerCell.ApplyStyle(tableStyle); headerrow.Cells.Add(headerCell); for (int j = 0; j < avTimeTable.Rows.Count; j++) { headerCell = new TableCell(); chk = new CheckBox(); chk.ID = "chk" + i.ToString() + j.ToString(); ; headerCell.Controls.Add(chk); headerrow.Cells.Add(headerCell); } MyTable.Rows.Add(headerrow); } MyTable.Rows.Add(headerrow); } }
1
6,019,632
05/16/2011 15:26:24
260,594
01/28/2010 02:29:49
2,242
8
Is Application_Error in global.asax really the way to handle errors?
The other day I appeared in interview, the interviewer asked me what is the purpose of global.asax. I said it is for catching specific events like Session_Start etc. He then said how do you do exception handling in your code? I said we wrap the statements in try catch block. He then said would you do this for all button click events in your code? That is so tedious and repetitive. Where does OOP come into picture here? He said you should always catch errors in Application_Error in global.asax. I said OOP does not say that you should catch all errors in this event. We should always catch specific exceptions and that should be in those respective handlers. We fell in quite a quarrel during interview and I straightforward said on his face that I do not agree with you. Can you tell me how do you all handle exceptions on server side? Thanks in advance :)
c#
asp.net
null
null
null
05/16/2011 17:06:20
not constructive
Is Application_Error in global.asax really the way to handle errors? === The other day I appeared in interview, the interviewer asked me what is the purpose of global.asax. I said it is for catching specific events like Session_Start etc. He then said how do you do exception handling in your code? I said we wrap the statements in try catch block. He then said would you do this for all button click events in your code? That is so tedious and repetitive. Where does OOP come into picture here? He said you should always catch errors in Application_Error in global.asax. I said OOP does not say that you should catch all errors in this event. We should always catch specific exceptions and that should be in those respective handlers. We fell in quite a quarrel during interview and I straightforward said on his face that I do not agree with you. Can you tell me how do you all handle exceptions on server side? Thanks in advance :)
4
5,020,527
02/16/2011 18:25:43
9,910
09/15/2008 20:23:11
260
11
How can I call a DB2 stored procedure with out parameters from SQuirreL SQL?
I really like SQuirreL SQL as a SQL query tool, but I've never been able to get it to call stored procedures in our AS/400 DB2 database. I always get the error "The number of parameter values set or registered does not match the number of parameters." I've double-checked the number of params and had no luck. This is the syntax I've tried for a procedure that takes one IN and one OUT: call SOMESPROC(12345, ?);
stored-procedures
db2
squirrel-sql
null
null
null
open
How can I call a DB2 stored procedure with out parameters from SQuirreL SQL? === I really like SQuirreL SQL as a SQL query tool, but I've never been able to get it to call stored procedures in our AS/400 DB2 database. I always get the error "The number of parameter values set or registered does not match the number of parameters." I've double-checked the number of params and had no luck. This is the syntax I've tried for a procedure that takes one IN and one OUT: call SOMESPROC(12345, ?);
0
6,005,980
05/15/2011 01:46:58
754,135
05/15/2011 01:46:58
1
0
making primeFaces ajax call in dataTable
I am using JSF 2 with PrimeFaces 2.2. I tried making an ajax call through a select box onchange event in a dataTable. I was able to see the System.outs printing but, I could not see the components given in the **update** attribute getting updated. I have given the dataTableId in the **update** attribute. I guess the problem now is the selectbox is getting populated again and an ajax call is made. Should we give only the parent tags in the **update** attirbute, for the ajax call to work. Please help me out in this.
ajax
jsf
datatable
primefaces
null
null
open
making primeFaces ajax call in dataTable === I am using JSF 2 with PrimeFaces 2.2. I tried making an ajax call through a select box onchange event in a dataTable. I was able to see the System.outs printing but, I could not see the components given in the **update** attribute getting updated. I have given the dataTableId in the **update** attribute. I guess the problem now is the selectbox is getting populated again and an ajax call is made. Should we give only the parent tags in the **update** attirbute, for the ajax call to work. Please help me out in this.
0
8,898,013
01/17/2012 16:18:47
1,069,771
11/28/2011 16:43:11
20
0
How to write this math equation in Latex
I want insert this math equation![enter image description here][1] into my paper however, the part in the brackets make me confused. I google math equation in Latex but find no relavent information. This is what I alreadly have now: $MR(e) = \Pi_{(R_{i}.ID, R_{j}.ID)}()$. Could you please help me to fill in the brackets. Many thanks. [1]: http://i.stack.imgur.com/bd9eD.png
latex
null
null
null
null
01/17/2012 18:17:04
off topic
How to write this math equation in Latex === I want insert this math equation![enter image description here][1] into my paper however, the part in the brackets make me confused. I google math equation in Latex but find no relavent information. This is what I alreadly have now: $MR(e) = \Pi_{(R_{i}.ID, R_{j}.ID)}()$. Could you please help me to fill in the brackets. Many thanks. [1]: http://i.stack.imgur.com/bd9eD.png
2
10,129,327
04/12/2012 18:12:59
965,769
09/26/2011 20:04:09
177
4
WPF + Kinect application
I want to do an WPF application with Kinect. The idea is pretty simple. An app that show some images, and I will pass to the next image with the gesture that will be catched by the kinect for windows. I saw a lot of books on internet, some codes, but I don't know how can I get started develop using Kinect sdk. Someone can get me some help ?
wpf
silverlight
kinect
null
null
null
open
WPF + Kinect application === I want to do an WPF application with Kinect. The idea is pretty simple. An app that show some images, and I will pass to the next image with the gesture that will be catched by the kinect for windows. I saw a lot of books on internet, some codes, but I don't know how can I get started develop using Kinect sdk. Someone can get me some help ?
0
3,334,989
07/26/2010 13:01:33
269,521
02/09/2010 13:51:51
218
10
How to configure the printer to stop after the page content is finished , irrespective of the page setup?
I'm printing an invoice from the browser and the invoice size may vary. I've set a page size of 6 inches width and 5 inches height.. Even if my invoice is just 2 lines it would take up the whole 5 inches height of paper and roll out.. Can i configure it to just stop rolling paper once the print content is finished, so that i can save paper? any ideas?
configuration
printing
null
null
null
null
open
How to configure the printer to stop after the page content is finished , irrespective of the page setup? === I'm printing an invoice from the browser and the invoice size may vary. I've set a page size of 6 inches width and 5 inches height.. Even if my invoice is just 2 lines it would take up the whole 5 inches height of paper and roll out.. Can i configure it to just stop rolling paper once the print content is finished, so that i can save paper? any ideas?
0
10,935,401
06/07/2012 15:54:58
1,339,527
04/17/2012 18:48:24
12
3
ASP Visual Basic Syntax Error
I'm trying to display an aggregate feed of several RSS feeds. I'm doing this with an asp page. The problem is I'm getting the error message: Microsoft VBScript compilation error '800a0401' Expected end of statement for the line: Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http://feeds.reuters.com/reuters/oddlyEnoughNews"), "FeedID", DateTime.Now) I can't figure out where the error is. Everything I've read suggests that it's a simple syntax error, a missing comma or something.
asp.net
vb.net
rss
null
null
null
open
ASP Visual Basic Syntax Error === I'm trying to display an aggregate feed of several RSS feeds. I'm doing this with an asp page. The problem is I'm getting the error message: Microsoft VBScript compilation error '800a0401' Expected end of statement for the line: Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http://feeds.reuters.com/reuters/oddlyEnoughNews"), "FeedID", DateTime.Now) I can't figure out where the error is. Everything I've read suggests that it's a simple syntax error, a missing comma or something.
0
9,885,067
03/27/2012 07:28:06
1,212,164
02/15/2012 18:53:20
8
0
Extract sub- and superdiagonal of a matrix in R
As the title implies, how does one extract the sub- and superdiagonal of a matrix?
r
matrix
extract
diagonal
null
null
open
Extract sub- and superdiagonal of a matrix in R === As the title implies, how does one extract the sub- and superdiagonal of a matrix?
0
5,989,656
05/13/2011 09:09:02
679,004
03/27/2011 14:33:05
28
1
Are there any good books on Xen and Virtualization?
Please recommend some good books on this topic.
cloud
virtualization
vmware
xen
null
09/22/2011 00:44:49
not constructive
Are there any good books on Xen and Virtualization? === Please recommend some good books on this topic.
4
11,526,391
07/17/2012 15:59:10
1,164,789
01/23/2012 11:02:24
19
2
command not found when runng bash script as user apache
I am trying to run a bash script as user apache. and it throws up the following [apache@denison public]$ ll total 32 drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 css -rw-r--r-- 1 apache apache 4820 Jul 17 10:04 h3111142_58_2012-07-17_16-03-58.php -rwxrwxrwx 1 apache apache 95 Jul 17 10:04 h31111.bash drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 images -rw-r--r-- 1 apache apache 754 Jul 17 08:13 index.php drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 javascript drwxr-xr-x 5 apache apache 4096 Jul 17 08:14 jquery-ui-1.8.21.custom [apache@denison public]$ bash h31111.bash : command not found : contents of the file are: #!/bin/bash /usr/bin/php /opt/eposdatatransfer/public/h3111142_58_2012-07-17_16-03-58.php
linux
apache
bash
script
null
null
open
command not found when runng bash script as user apache === I am trying to run a bash script as user apache. and it throws up the following [apache@denison public]$ ll total 32 drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 css -rw-r--r-- 1 apache apache 4820 Jul 17 10:04 h3111142_58_2012-07-17_16-03-58.php -rwxrwxrwx 1 apache apache 95 Jul 17 10:04 h31111.bash drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 images -rw-r--r-- 1 apache apache 754 Jul 17 08:13 index.php drwxr-xr-x 2 apache apache 4096 Jul 17 08:14 javascript drwxr-xr-x 5 apache apache 4096 Jul 17 08:14 jquery-ui-1.8.21.custom [apache@denison public]$ bash h31111.bash : command not found : contents of the file are: #!/bin/bash /usr/bin/php /opt/eposdatatransfer/public/h3111142_58_2012-07-17_16-03-58.php
0
8,282,204
11/26/2011 22:45:07
16,476
09/17/2008 17:31:43
2,938
78
P/Invoke Runtime Errors
I am trying to create a managed wrapper around a C++ dll. When I try to run a test app, I get an error saying loading the dll failed. This turns out to be a problem with trying to find the CRT. Copying the CRT to the same directory moves past this problem, but then throws an error saying the application loaded the C Runtime incorrectly (R6034). A native C++ program has no trouble with either of these issues. My questions are : 1) Why can the native program load the CRT, but the managed wrapper can't find it? 2) Where could I look for things to try to fix the second error about loading the CRT? ie could this be because of name mangling, CallingConvention, etc? [DllImport("mydll.dll")] public static extern void startCall(string hostname ); public Test() { string hostname = ""; startCall(hostname); }
c#
c++
pinvoke
null
null
null
open
P/Invoke Runtime Errors === I am trying to create a managed wrapper around a C++ dll. When I try to run a test app, I get an error saying loading the dll failed. This turns out to be a problem with trying to find the CRT. Copying the CRT to the same directory moves past this problem, but then throws an error saying the application loaded the C Runtime incorrectly (R6034). A native C++ program has no trouble with either of these issues. My questions are : 1) Why can the native program load the CRT, but the managed wrapper can't find it? 2) Where could I look for things to try to fix the second error about loading the CRT? ie could this be because of name mangling, CallingConvention, etc? [DllImport("mydll.dll")] public static extern void startCall(string hostname ); public Test() { string hostname = ""; startCall(hostname); }
0
8,713,091
01/03/2012 13:36:19
445,944
09/13/2010 03:57:57
36
0
how to change stream index in libavformat
I'm a newbie in ffmpeg. I have a problem when some media has multiple audio streams. Suppose in MKV file, it has three audio streams (MP3, WMA and WMAPro) How do I change the stream index when demuxing using: AVPacket inputPacket; ret = av_read_frame(avInputFmtCtx, &inputPacket) So I'm searching something like change_stream_index(int streamindex), and when I call that function (suppose change_stream_index(2)), the next call to av_read_frame will demux WMAPro frame instead of MP3. Thanks guys!
libavformat
null
null
null
null
null
open
how to change stream index in libavformat === I'm a newbie in ffmpeg. I have a problem when some media has multiple audio streams. Suppose in MKV file, it has three audio streams (MP3, WMA and WMAPro) How do I change the stream index when demuxing using: AVPacket inputPacket; ret = av_read_frame(avInputFmtCtx, &inputPacket) So I'm searching something like change_stream_index(int streamindex), and when I call that function (suppose change_stream_index(2)), the next call to av_read_frame will demux WMAPro frame instead of MP3. Thanks guys!
0
9,609,916
03/07/2012 22:10:23
283,296
02/28/2010 23:05:44
1,859
7
IPython. Running python scripts on a different path
Say I have a python script `test.py` in some path `path_A` And say I a IPython shell open in a path `path_B`. I would like to be able to do: run test.py from `path_B` (where the shell is open). Is that possible in IPython? Is there anything like a `PATH` variable in IPython?
ipython
null
null
null
null
null
open
IPython. Running python scripts on a different path === Say I have a python script `test.py` in some path `path_A` And say I a IPython shell open in a path `path_B`. I would like to be able to do: run test.py from `path_B` (where the shell is open). Is that possible in IPython? Is there anything like a `PATH` variable in IPython?
0
216,102
10/19/2008 06:19:42
25,700
10/07/2008 03:14:45
6
0
Installing GCC 3.4.6 in RHEL4
I do the following in command line: 1) wget ftp://mirrors.kernel.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 2) tar -jxf gcc-3.4.6.tar.bz2 3) cd gcc-3.4.6 4) cd libstdc++-v3 5) ./configure And I get the following error: configure: error: cannot find install-sh or install.sh in ./../.. There is actually an "install-sh" file in the gcc-3.4.6 directory, but that's one directory up the current, not two. The configure script should look for install-sh in "./.." insted of "./../.." ?? What's wrong??
gcc
installation
null
null
null
null
open
Installing GCC 3.4.6 in RHEL4 === I do the following in command line: 1) wget ftp://mirrors.kernel.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 2) tar -jxf gcc-3.4.6.tar.bz2 3) cd gcc-3.4.6 4) cd libstdc++-v3 5) ./configure And I get the following error: configure: error: cannot find install-sh or install.sh in ./../.. There is actually an "install-sh" file in the gcc-3.4.6 directory, but that's one directory up the current, not two. The configure script should look for install-sh in "./.." insted of "./../.." ?? What's wrong??
0
4,782,203
01/24/2011 12:54:11
188,737
10/12/2009 23:12:28
3
0
Inexpensive Two-factor authentication for a home server?
I was considering adding some kind of two-factor authentication to my small home network of linux dedicated servers. I would need, maybe at absolute most, 10 physical devices. Are there any companies out there that would provide such a small order, for relatively cheap? Thanks, Daniel PS This is mainly for my own enjoyment of setting up of a system; I do not claim to function highly at-risk machines.
linux
encryption
otp
it
null
null
open
Inexpensive Two-factor authentication for a home server? === I was considering adding some kind of two-factor authentication to my small home network of linux dedicated servers. I would need, maybe at absolute most, 10 physical devices. Are there any companies out there that would provide such a small order, for relatively cheap? Thanks, Daniel PS This is mainly for my own enjoyment of setting up of a system; I do not claim to function highly at-risk machines.
0
6,587,377
07/05/2011 18:45:54
539,617
12/12/2010 15:02:49
184
8
Sharepoint 2010. The simpliest way to change site language.
I kow that there is no way to change site language except modifying the database. I heared that those actions can damage site. Is that true? Is there any simple way to recreate the site without doing all the work again? Thanks in advance for your answers.
sharepoint
website
language
change
null
11/01/2011 15:25:57
off topic
Sharepoint 2010. The simpliest way to change site language. === I kow that there is no way to change site language except modifying the database. I heared that those actions can damage site. Is that true? Is there any simple way to recreate the site without doing all the work again? Thanks in advance for your answers.
2
2,704,157
04/24/2010 10:50:51
297,907
03/20/2010 07:10:00
1
0
How to generate Image at server side in java [ blog-> string_image -> *.png or .jpg ]
> I want to generate image on server side. My Image is stored in server side's database in blob format and I am able to convert it into string_image; Then How to convert that string_image into actual .jpg or .png format. Actually I am posting attachment as image on users facebook' wall. How to generate Image at server side in Java? Is there any sample code to do it?
java
image
server-side
facebook
null
null
open
How to generate Image at server side in java [ blog-> string_image -> *.png or .jpg ] === > I want to generate image on server side. My Image is stored in server side's database in blob format and I am able to convert it into string_image; Then How to convert that string_image into actual .jpg or .png format. Actually I am posting attachment as image on users facebook' wall. How to generate Image at server side in Java? Is there any sample code to do it?
0
7,154,143
08/22/2011 22:03:04
906,722
08/22/2011 22:03:04
1
0
error message: "451 unable to listen on socket"
i have a limited knowledge and understanding of code and whatnot, so i apologize if this is a dumb (or easily solvable) question; but I am trying to access an FTP site. i have the address, login name, and password, but receive the error message "451 unable to listen on socket" when attempting to login. can someone please help me? thanks.
sockets
listen
null
null
null
08/23/2011 20:21:51
off topic
error message: "451 unable to listen on socket" === i have a limited knowledge and understanding of code and whatnot, so i apologize if this is a dumb (or easily solvable) question; but I am trying to access an FTP site. i have the address, login name, and password, but receive the error message "451 unable to listen on socket" when attempting to login. can someone please help me? thanks.
2
5,422,214
03/24/2011 16:16:27
135,852
07/09/2009 19:03:13
650
20
asp.net mvc list manager
Any "list" manager for asp.net mvc or vanilla asp.net similar to say * Sharepoint Lists * Create your own list on google sites preferably open-source!
c#
.net
asp.net
asp.net-mvc
sharepoint
03/25/2011 20:24:30
not a real question
asp.net mvc list manager === Any "list" manager for asp.net mvc or vanilla asp.net similar to say * Sharepoint Lists * Create your own list on google sites preferably open-source!
1
4,932,851
02/08/2011 12:15:20
608,062
02/08/2011 11:59:33
1
0
source code for following question
1 12 123 1234 tell me about source about this problem.
c++
c
null
null
null
02/08/2011 12:19:39
not a real question
source code for following question === 1 12 123 1234 tell me about source about this problem.
1
6,856,560
07/28/2011 09:10:14
66,854
02/16/2009 08:26:11
67
0
Any free tool for testing RTSP Performance
Is there a free tool available to test RTSP performance . Jmeter unfortunately does not support rtsp . so , if there is a free tool out there which can test rtsp . please let me know . thanks in advance
performance
rtsp
null
null
null
null
open
Any free tool for testing RTSP Performance === Is there a free tool available to test RTSP performance . Jmeter unfortunately does not support rtsp . so , if there is a free tool out there which can test rtsp . please let me know . thanks in advance
0
5,328,789
03/16/2011 16:55:19
235,310
12/19/2009 23:25:11
590
14
What is the best, efficient approach to do a quick forms based web project?
I am a database guy and its been few years since I did anything with PHP (no MVC experience). I now have to work on a Data Entry project - a form that a user will fill and submit data to the database. I figured this is much more efficient than a spreadsheet approach. All I need is : 1) Authentication 2) Validation of data 3) Submit data to the database. How would you suggest I proceed? I have 2 weeks time for this project. Should I dabble with MVC and do it the industry standard way or go with good 'ol procedural PHP way? Some things I looked at : 1) Symfony 2) CakePHP 3) Django Any ideas, suggestions are really appreciated. Thank you!
python
django
mvc
cakephp
symfony
03/17/2011 08:19:03
not constructive
What is the best, efficient approach to do a quick forms based web project? === I am a database guy and its been few years since I did anything with PHP (no MVC experience). I now have to work on a Data Entry project - a form that a user will fill and submit data to the database. I figured this is much more efficient than a spreadsheet approach. All I need is : 1) Authentication 2) Validation of data 3) Submit data to the database. How would you suggest I proceed? I have 2 weeks time for this project. Should I dabble with MVC and do it the industry standard way or go with good 'ol procedural PHP way? Some things I looked at : 1) Symfony 2) CakePHP 3) Django Any ideas, suggestions are really appreciated. Thank you!
4
7,719,678
10/10/2011 23:08:18
591,336
01/26/2011 21:08:04
1
0
3rd party image proxy with resize and crop features
I have a database containing URL's to images on the web (hosted by 3rd parties) that I'd like to display on my webpage in different formats. The ideal solution would be to have a REST-based service that I can provide with parameters like - the original URL - resize instructions (max-width/height) - crop instruction (widht/height, fit) - other manipulations (grayscale, etc...) For performance, the service should provide caching. The only two services that come anywhere near are [urlimg.com][1] (perfect qua features, but suffering frequent downtime) and [images.weserv.nl][2] (limited in features, not tested thoroughly yet). Preferably, the service is free for testing or low traffic and charging based on data traffic. An alternative would be a service that can be easily hosted as Amazon EC2 instance or as Google Apps Engine service. [1]: http://urlimg.com [2]: http://images.weserv.nl
web-services
image
caching
rest
proxy
10/12/2011 03:00:27
off topic
3rd party image proxy with resize and crop features === I have a database containing URL's to images on the web (hosted by 3rd parties) that I'd like to display on my webpage in different formats. The ideal solution would be to have a REST-based service that I can provide with parameters like - the original URL - resize instructions (max-width/height) - crop instruction (widht/height, fit) - other manipulations (grayscale, etc...) For performance, the service should provide caching. The only two services that come anywhere near are [urlimg.com][1] (perfect qua features, but suffering frequent downtime) and [images.weserv.nl][2] (limited in features, not tested thoroughly yet). Preferably, the service is free for testing or low traffic and charging based on data traffic. An alternative would be a service that can be easily hosted as Amazon EC2 instance or as Google Apps Engine service. [1]: http://urlimg.com [2]: http://images.weserv.nl
2
3,610,939
08/31/2010 16:09:11
428,880
08/23/2010 21:50:17
3
0
Windows GUID listings
I've been looking for a complete listing of important GUIDs the best I can find is http://www.myplugins.info/guids/guidlist.php although it seems like it is still missing some things like the GUID for IContextMenu. Would anyone know how to find these? Or is there a better listing of commonly used GUIDs in Windows?
windows
guid
null
null
null
null
open
Windows GUID listings === I've been looking for a complete listing of important GUIDs the best I can find is http://www.myplugins.info/guids/guidlist.php although it seems like it is still missing some things like the GUID for IContextMenu. Would anyone know how to find these? Or is there a better listing of commonly used GUIDs in Windows?
0
7,409,094
09/13/2011 22:03:07
51,816
01/05/2009 21:39:06
9,960
20
Where are the CsharpRepl and the interactive shell are located in Mono for Win?
I installed Mono on Win7 and trying to find the apps outlined [here][1]. but they don't mention where are they located and launched. Any ideas on how to access them as a user? [1]: http://www.mono-project.com/CsharpRepl
c#
.net
mono
null
null
null
open
Where are the CsharpRepl and the interactive shell are located in Mono for Win? === I installed Mono on Win7 and trying to find the apps outlined [here][1]. but they don't mention where are they located and launched. Any ideas on how to access them as a user? [1]: http://www.mono-project.com/CsharpRepl
0
2,534,205
03/28/2010 19:32:42
303,738
03/28/2010 19:32:42
1
0
Practical ways around the GPL?
My company makes an extremely specialized piece of software which costs alot of money for those few who need it. On our current release we have no choice but to use a few libraries which are released only under the GPL. Releasing the code of is absolutely not an option and it would take months, if not years to reimplement the functionality. What do companies do in this situation? Are there practical and legal ways around the GPL? Thanks.
gpl
null
null
null
null
03/29/2010 09:12:26
off topic
Practical ways around the GPL? === My company makes an extremely specialized piece of software which costs alot of money for those few who need it. On our current release we have no choice but to use a few libraries which are released only under the GPL. Releasing the code of is absolutely not an option and it would take months, if not years to reimplement the functionality. What do companies do in this situation? Are there practical and legal ways around the GPL? Thanks.
2
5,732,283
04/20/2011 14:48:33
231,716
12/14/2009 23:22:11
12,494
1,124
Issue Displaying Images When Logged Out
I have two images, a header image that appears at the top, and a logo that I position within the image. The header image is applied on a DIV with a `style="background-image(url('x'));"`, and the logo via `<asp:Image />`. The images are in a Content folder. In my config file, I enable permissions to anonymous users in the Content folder via: <location path="Content"> <system.web> <authorization> <allow users="?"/> <allow users="*"/> </authorization> </system.web> </location> But for some reason, the header image appears but the logo image doesn't appear when the user logs out. The logo appears when logged in. Why is that? Thanks.
.net
asp.net
forms-authentication
authorization
null
null
open
Issue Displaying Images When Logged Out === I have two images, a header image that appears at the top, and a logo that I position within the image. The header image is applied on a DIV with a `style="background-image(url('x'));"`, and the logo via `<asp:Image />`. The images are in a Content folder. In my config file, I enable permissions to anonymous users in the Content folder via: <location path="Content"> <system.web> <authorization> <allow users="?"/> <allow users="*"/> </authorization> </system.web> </location> But for some reason, the header image appears but the logo image doesn't appear when the user logs out. The logo appears when logged in. Why is that? Thanks.
0
5,799,408
04/27/2011 04:35:41
726,521
04/21/2011 12:27:19
1
0
books on htaccess
can any one suggest me good book for .htaccess which easily available in India, book may content all basic as well as higher levels of how to write htaccess.
apache
.htaccess
null
null
null
04/27/2011 22:05:41
off topic
books on htaccess === can any one suggest me good book for .htaccess which easily available in India, book may content all basic as well as higher levels of how to write htaccess.
2
8,297,480
11/28/2011 14:41:50
386,660
07/08/2010 12:47:13
181
25
twitter sahre button
I want my own image for twitter share button and want to also open in pop-box, Its happen in facebook but In twitter I am able to find out. Could anybody give me link or solution
javascript
css
twitter
twitter-api
null
11/28/2011 18:24:04
not a real question
twitter sahre button === I want my own image for twitter share button and want to also open in pop-box, Its happen in facebook but In twitter I am able to find out. Could anybody give me link or solution
1
11,192,220
06/25/2012 15:22:00
1,412,921
05/23/2012 14:46:24
17
0
leaked window again
06-25 15:03:02.596: E/WindowManager(29217): at com.android.grad.PreviewActivity$1.onClick(PreviewActivity.java:36) 06-25 15:03:02.596: E/WindowManager(29217): at android.view.View.performClick(View.java:3527) 06-25 15:03:02.596: E/WindowManager(29217): at android.view.View$PerformClick.run(View.java:14234) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Handler.handleCallback(Handler.java:605) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Handler.dispatchMessage(Handler.java:92) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Looper.loop(Looper.java:137) 06-25 15:03:02.596: E/WindowManager(29217): at android.app.ActivityThread.main(ActivityThread.java:4441) 06-25 15:03:02.596: E/WindowManager(29217): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 15:03:02.596: E/WindowManager(29217): at java.lang.reflect.Method.invoke(Method.java:511) 06-25 15:03:02.596: E/WindowManager(29217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 06-25 15:03:02.596: E/WindowManager(29217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-25 15:03:02.596: E/WindowManager(29217): at dalvik.system.NativeStart.main(Native Method) 06-25 15:03:04.186: I/Process(29217): Sending signal. PID: 29217 SIG: 9 06-25 15:03:04.566: D/TextLayoutCache(29339): Using debug level: 0 - Debug Enabled: 0 06-25 15:03:04.606: D/libEGL(29339): loaded /system/lib/egl/libGLES_android.so 06-25 15:03:04.606: D/libEGL(29339): loaded /system/lib/egl/libEGL_adreno200.so 06-25 15:03:04.636: D/libEGL(29339): loaded /system/lib/egl/libGLESv1_CM_adreno200.so 06-25 15:03:04.636: D/dalvikvm(29339): GC_CONCURRENT freed 117K, 3% free 9125K/9351K, paused 4ms+17ms 06-25 15:03:04.636: D/libEGL(29339): loaded /system/lib/egl/libGLESv2_adreno200.so 06-25 15:03:04.706: D/OpenGLRenderer(29339): Enabling debug mode 0 06-25 15:03:07.326: D/OpenGLRenderer(29339): Flushing caches (mode 0) 06-25 15:03:07.326: W/IInputConnectionWrapper(29339): showStatusIcon on inactive InputConnection 06-25 15:03:07.366: D/OpenGLRenderer(29339): Flushing caches (mode 1) I know that this error asked before and i saw the solutions for that but the solutions don't work with me. and this is my code. The error appear on pd.show(). @Override protected void onPreExecute() { //network.loadData(); file = new File( Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyCameraApp" + File.separator + "project"); createProgressDialog(); pd.show(); } @Override protected Boolean doInBackground(String... params) { try { crop = new Crop(params[0]); crop.cropID(); croppedID = crop.getId(); publishProgress(2); } catch (IOException e) { } segmentNumbers(); return true; } @Override protected void onProgressUpdate(Integer... values) { pd.incrementProgressBy(values[0]); } @Override protected void onPostExecute(Boolean result) { pd.dismiss(); Toast.makeText(activity, "Processing Done", Toast.LENGTH_LONG).show(); } private void createProgressDialog() { pd = new ProgressDialog(activity); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pd.setTitle("Extract ID"); pd.setMessage("Processing..."); pd.setIcon(R.drawable.ic_launcher); pd.setProgress(0); pd.setCancelable(false); } onpreExecution method :- i am showing my dialog. doInBackGround method :- I execute my segmentNumber() which used to segement picture. onPostExecution method :- I am dismissing my dialog.
android
null
null
null
null
null
open
leaked window again === 06-25 15:03:02.596: E/WindowManager(29217): at com.android.grad.PreviewActivity$1.onClick(PreviewActivity.java:36) 06-25 15:03:02.596: E/WindowManager(29217): at android.view.View.performClick(View.java:3527) 06-25 15:03:02.596: E/WindowManager(29217): at android.view.View$PerformClick.run(View.java:14234) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Handler.handleCallback(Handler.java:605) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Handler.dispatchMessage(Handler.java:92) 06-25 15:03:02.596: E/WindowManager(29217): at android.os.Looper.loop(Looper.java:137) 06-25 15:03:02.596: E/WindowManager(29217): at android.app.ActivityThread.main(ActivityThread.java:4441) 06-25 15:03:02.596: E/WindowManager(29217): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 15:03:02.596: E/WindowManager(29217): at java.lang.reflect.Method.invoke(Method.java:511) 06-25 15:03:02.596: E/WindowManager(29217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 06-25 15:03:02.596: E/WindowManager(29217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-25 15:03:02.596: E/WindowManager(29217): at dalvik.system.NativeStart.main(Native Method) 06-25 15:03:04.186: I/Process(29217): Sending signal. PID: 29217 SIG: 9 06-25 15:03:04.566: D/TextLayoutCache(29339): Using debug level: 0 - Debug Enabled: 0 06-25 15:03:04.606: D/libEGL(29339): loaded /system/lib/egl/libGLES_android.so 06-25 15:03:04.606: D/libEGL(29339): loaded /system/lib/egl/libEGL_adreno200.so 06-25 15:03:04.636: D/libEGL(29339): loaded /system/lib/egl/libGLESv1_CM_adreno200.so 06-25 15:03:04.636: D/dalvikvm(29339): GC_CONCURRENT freed 117K, 3% free 9125K/9351K, paused 4ms+17ms 06-25 15:03:04.636: D/libEGL(29339): loaded /system/lib/egl/libGLESv2_adreno200.so 06-25 15:03:04.706: D/OpenGLRenderer(29339): Enabling debug mode 0 06-25 15:03:07.326: D/OpenGLRenderer(29339): Flushing caches (mode 0) 06-25 15:03:07.326: W/IInputConnectionWrapper(29339): showStatusIcon on inactive InputConnection 06-25 15:03:07.366: D/OpenGLRenderer(29339): Flushing caches (mode 1) I know that this error asked before and i saw the solutions for that but the solutions don't work with me. and this is my code. The error appear on pd.show(). @Override protected void onPreExecute() { //network.loadData(); file = new File( Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyCameraApp" + File.separator + "project"); createProgressDialog(); pd.show(); } @Override protected Boolean doInBackground(String... params) { try { crop = new Crop(params[0]); crop.cropID(); croppedID = crop.getId(); publishProgress(2); } catch (IOException e) { } segmentNumbers(); return true; } @Override protected void onProgressUpdate(Integer... values) { pd.incrementProgressBy(values[0]); } @Override protected void onPostExecute(Boolean result) { pd.dismiss(); Toast.makeText(activity, "Processing Done", Toast.LENGTH_LONG).show(); } private void createProgressDialog() { pd = new ProgressDialog(activity); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pd.setTitle("Extract ID"); pd.setMessage("Processing..."); pd.setIcon(R.drawable.ic_launcher); pd.setProgress(0); pd.setCancelable(false); } onpreExecution method :- i am showing my dialog. doInBackGround method :- I execute my segmentNumber() which used to segement picture. onPostExecution method :- I am dismissing my dialog.
0
1,279,613
08/14/2009 19:03:59
143,596
07/23/2009 10:29:12
45
4
Someone suggested I use an ORM for a project I'm designing
but I'm having trouble finding information on what they are or how they work. Can anyone give me a brief explanation or a link as to where I can learn more about them? Thank you.
orm
python
null
null
null
null
open
Someone suggested I use an ORM for a project I'm designing === but I'm having trouble finding information on what they are or how they work. Can anyone give me a brief explanation or a link as to where I can learn more about them? Thank you.
0
5,503,808
03/31/2011 17:27:00
53,670
01/10/2009 12:21:36
1,263
0
How to pronounce mingw and cygwin
I get confused with how to pronounce the these word. thanks.
pronunciation
null
null
null
null
03/14/2012 05:15:28
off topic
How to pronounce mingw and cygwin === I get confused with how to pronounce the these word. thanks.
2
4,408,195
12/10/2010 11:08:18
518,342
11/24/2010 05:09:49
1
0
how to use ocx control in asp.net
i need to use ocx control im my web application .. plz tell me how to use it
asp.net
null
null
null
null
07/17/2012 14:49:11
not a real question
how to use ocx control in asp.net === i need to use ocx control im my web application .. plz tell me how to use it
1
8,907,860
01/18/2012 09:30:23
1,138,275
01/09/2012 08:35:48
17
1
managing numbers in shared preferences
public void onClick(View v) { switch(v.getId()){ case R.id.save2: s = text.getText().toString(); number = Float.parseFloat(num.getText().toString()); SharedPreferences.Editor editor = shared.edit(); editor.putString("sharedtext",s); editor.putFloat("sharednum",number); editor.commit(); Toast.makeText(this,"save2",Toast.LENGTH_SHORT).show(); break; case R.id.load2: String returner = shared.getString("sharedtext","Returner fail"); float returnnum = shared.getFloat("sharednum",0); text.setText(returner); num.setText(returnnum); //error here Toast.makeText(this,"load2",Toast.LENGTH_SHORT).show(); break; case R.id.page2: intent= new Intent(this,SharedPreferencesActivity.class); startActivity(intent); Toast.makeText(this,"page2",Toast.LENGTH_SHORT).show(); break; } how could i resolve this error? how to make something like setInt(int num); btw the variable num and text are both EditText
android
get
integer
sharedpreferences
put
null
open
managing numbers in shared preferences === public void onClick(View v) { switch(v.getId()){ case R.id.save2: s = text.getText().toString(); number = Float.parseFloat(num.getText().toString()); SharedPreferences.Editor editor = shared.edit(); editor.putString("sharedtext",s); editor.putFloat("sharednum",number); editor.commit(); Toast.makeText(this,"save2",Toast.LENGTH_SHORT).show(); break; case R.id.load2: String returner = shared.getString("sharedtext","Returner fail"); float returnnum = shared.getFloat("sharednum",0); text.setText(returner); num.setText(returnnum); //error here Toast.makeText(this,"load2",Toast.LENGTH_SHORT).show(); break; case R.id.page2: intent= new Intent(this,SharedPreferencesActivity.class); startActivity(intent); Toast.makeText(this,"page2",Toast.LENGTH_SHORT).show(); break; } how could i resolve this error? how to make something like setInt(int num); btw the variable num and text are both EditText
0
7,383,367
09/12/2011 04:36:23
929,980
09/06/2011 05:32:17
11
0
Knowing size of String object
How to know the size allaocated to String object in case of String s=new String("abc"); String s="abc";
string
size
null
null
null
09/12/2011 06:39:21
not a real question
Knowing size of String object === How to know the size allaocated to String object in case of String s=new String("abc"); String s="abc";
1
7,621,997
10/01/2011 18:04:59
506,399
11/13/2010 00:36:50
530
0
Google Translate style select menus
I want to style an HTML select menu with CSS in a similar style to how Google does it on Google Translate (http://translate.google.com). I have looked for tutorials online but everything used jQuery. **How can I make something similar to this but using CSS to style it?** I hope you can understand my question and what I am trying to describe. ![Select menu from Google Translate][1] [1]: http://i.stack.imgur.com/lMMTN.jpg
javascript
jquery
html
css
null
null
open
Google Translate style select menus === I want to style an HTML select menu with CSS in a similar style to how Google does it on Google Translate (http://translate.google.com). I have looked for tutorials online but everything used jQuery. **How can I make something similar to this but using CSS to style it?** I hope you can understand my question and what I am trying to describe. ![Select menu from Google Translate][1] [1]: http://i.stack.imgur.com/lMMTN.jpg
0
10,849,156
06/01/2012 11:10:19
1,430,428
06/01/2012 10:10:30
1
0
JSR88 deployment to JBoss in AS 7.1.0 not working properly (giving improper Deployment URL)
I am trying to use JSR88 deployment to JBoss as per the instructions provided in https://community.jboss.org/wiki/JSR88Client/diff?secondVersionNumber=16&_sscc=t I want to remotely deploy a test.war file using JSR88 implementation provided by JBOSS. However, My test.war file gets uploaded at location as $JBOSS_HOME\standalone\data\content\d7\37f7368101b293d280c225326dd8774aa315c1\content on the server but the war gets registered within standalone.xml as: <deployments> <deployment name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war" runtime-name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war"> <content sha1="d737f7368101b293d280c225326dd8774aa315c1"/> </deployment> </deployments> Thus the context created for the deployed war is of form /**file:/C:/Users/thisuser/AppData/Local/Temp/test.war**. While the same file is deployed using the Administration Console the standalone.xml contains the entry as follows: <deployments> <deployment name="test.war" runtime-name="test.war"> <content sha1="d737f7368101b293d280c225326dd8774aa315c1"/> </deployment> </deployments> Thus the context created for the deployed war is of form /**test.war** and is accessible over URL http: / / host-url:8080/test My real concern the the deployment-name, runtime-name and context-name with which my test.war gets registered while deploying using JSR88 deployment. Requesting to please comment on my observation. Is there anything within the process of JSR88 deployment that I am missing or am I missing any configuration ? Thanks in advance.
jboss
jboss7.x
null
null
null
null
open
JSR88 deployment to JBoss in AS 7.1.0 not working properly (giving improper Deployment URL) === I am trying to use JSR88 deployment to JBoss as per the instructions provided in https://community.jboss.org/wiki/JSR88Client/diff?secondVersionNumber=16&_sscc=t I want to remotely deploy a test.war file using JSR88 implementation provided by JBOSS. However, My test.war file gets uploaded at location as $JBOSS_HOME\standalone\data\content\d7\37f7368101b293d280c225326dd8774aa315c1\content on the server but the war gets registered within standalone.xml as: <deployments> <deployment name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war" runtime-name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war"> <content sha1="d737f7368101b293d280c225326dd8774aa315c1"/> </deployment> </deployments> Thus the context created for the deployed war is of form /**file:/C:/Users/thisuser/AppData/Local/Temp/test.war**. While the same file is deployed using the Administration Console the standalone.xml contains the entry as follows: <deployments> <deployment name="test.war" runtime-name="test.war"> <content sha1="d737f7368101b293d280c225326dd8774aa315c1"/> </deployment> </deployments> Thus the context created for the deployed war is of form /**test.war** and is accessible over URL http: / / host-url:8080/test My real concern the the deployment-name, runtime-name and context-name with which my test.war gets registered while deploying using JSR88 deployment. Requesting to please comment on my observation. Is there anything within the process of JSR88 deployment that I am missing or am I missing any configuration ? Thanks in advance.
0
10,928,668
06/07/2012 08:55:34
555,265
12/27/2010 18:57:17
74
0
Inspecting double.ToString()
As a follow up to a question I had about optimising the conversion of double to string for memory (see http://stackoverflow.com/questions/10914105/c-sharp-double-to-character-array-or-alternative/10914673#10914673) I wanted to see how double.ToString() is implemented under the hood in .NET. When I use ildasm or DotPeek i get as far as: [SecurityCritical] [MethodImpl(MethodImplOptions.InternalCall)] public static string FormatDouble(double value, string format, NumberFormatInfo info); or IL_0008: call string System.Number::FormatDouble(float64, string, class System.Globalization.NumberFormatInfo) And can't drill further. I think if my understanding is right it's because this is a call into the CLR. I wanted to know is there any easy way to find out what the implementation is? Cheers A
c#
.net
clr
double
tostring
null
open
Inspecting double.ToString() === As a follow up to a question I had about optimising the conversion of double to string for memory (see http://stackoverflow.com/questions/10914105/c-sharp-double-to-character-array-or-alternative/10914673#10914673) I wanted to see how double.ToString() is implemented under the hood in .NET. When I use ildasm or DotPeek i get as far as: [SecurityCritical] [MethodImpl(MethodImplOptions.InternalCall)] public static string FormatDouble(double value, string format, NumberFormatInfo info); or IL_0008: call string System.Number::FormatDouble(float64, string, class System.Globalization.NumberFormatInfo) And can't drill further. I think if my understanding is right it's because this is a call into the CLR. I wanted to know is there any easy way to find out what the implementation is? Cheers A
0
11,625,440
07/24/2012 06:40:10
135,318
07/08/2009 23:24:01
4,317
75
In ASP.NET, how do I add a CORS header for only TTF files?
I have a page with an iframe that shows an external page. The external page is configured to download a CSS file from my server. In the CSS, I added a `@font-face` selector: @font-face { font-family: "Special Font"; src: url("<%= Request.Url.GetLeftPart(UriPartial.Authority) + "/fonts/specialfont.ttf" %>"); } This downloads and shows the font fine in Chrome, but in Firefox, it downloads the font, but refuses to use it. Doing a little bit of research shows that this problem is a cross-origin policy issue. One of the solutions mentioned here: http://enable-cors.org/ Is to enable the CORS header. However, the solution it provided is site-wide: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration> Whereas I would only like to enable it for only `.TTF` files. Is there a way to do this, either through using a HttpHandler or some other method?
c#
asp.net
font-face
cors
null
null
open
In ASP.NET, how do I add a CORS header for only TTF files? === I have a page with an iframe that shows an external page. The external page is configured to download a CSS file from my server. In the CSS, I added a `@font-face` selector: @font-face { font-family: "Special Font"; src: url("<%= Request.Url.GetLeftPart(UriPartial.Authority) + "/fonts/specialfont.ttf" %>"); } This downloads and shows the font fine in Chrome, but in Firefox, it downloads the font, but refuses to use it. Doing a little bit of research shows that this problem is a cross-origin policy issue. One of the solutions mentioned here: http://enable-cors.org/ Is to enable the CORS header. However, the solution it provided is site-wide: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration> Whereas I would only like to enable it for only `.TTF` files. Is there a way to do this, either through using a HttpHandler or some other method?
0
10,528,440
05/10/2012 06:17:00
1,386,283
05/10/2012 06:09:47
1
0
When i like a page on Facebook via facebook like delegate, the method of facebookLikeDidLike does not invokes in objective c
I am using facebook like delegate available on internet and in my xcode sk the metod - (void)facebookLikeViewDidLike:(FacebookLikeView *)aFacebookLikeView does not invokes. I want app to open facebook like option on startup and if likes then proceed to app after dismissing automatically the like view... but if page is automatically liked then the view should not appear on startup.
iphone
objective-c
ios
null
null
05/10/2012 13:58:55
not a real question
When i like a page on Facebook via facebook like delegate, the method of facebookLikeDidLike does not invokes in objective c === I am using facebook like delegate available on internet and in my xcode sk the metod - (void)facebookLikeViewDidLike:(FacebookLikeView *)aFacebookLikeView does not invokes. I want app to open facebook like option on startup and if likes then proceed to app after dismissing automatically the like view... but if page is automatically liked then the view should not appear on startup.
1
5,121,109
02/25/2011 18:26:54
586,599
01/23/2011 18:58:42
5
0
Actionscript 3 - make sound only play once when objects touch
I have a griddle_mc, bacon_mc, and BaconCooking.wav. I want to play the wav when the bacon is moved onto the griddle. If I move the bacon until it just touches the griddle the wav plays fine, but if I continue to drag the bacon_mc across the griddle the wav becomes loud and distorted, almost like it's playing multiple instances of the wav at the same time. private function __handleSliceDown($evt:MouseEvent):void { slice1_mc.startDrag(true); } private function __handleSliceUp($evt:MouseEvent):void { slice1_mc.stopDrag(); addEventListener(Event.ENTER_FRAME, __checkHit); } private function __checkHit($evt:Event):void { if (this.slice1_mc.hitTestObject(griddle_mc)) { if (!hitting) { sc = BaconCooking.play(); } } } How can I get the wav to play correctly?
flash
actionscript-3
wav
playback
null
null
open
Actionscript 3 - make sound only play once when objects touch === I have a griddle_mc, bacon_mc, and BaconCooking.wav. I want to play the wav when the bacon is moved onto the griddle. If I move the bacon until it just touches the griddle the wav plays fine, but if I continue to drag the bacon_mc across the griddle the wav becomes loud and distorted, almost like it's playing multiple instances of the wav at the same time. private function __handleSliceDown($evt:MouseEvent):void { slice1_mc.startDrag(true); } private function __handleSliceUp($evt:MouseEvent):void { slice1_mc.stopDrag(); addEventListener(Event.ENTER_FRAME, __checkHit); } private function __checkHit($evt:Event):void { if (this.slice1_mc.hitTestObject(griddle_mc)) { if (!hitting) { sc = BaconCooking.play(); } } } How can I get the wav to play correctly?
0
4,264,460
11/24/2010 07:40:24
51,167
01/03/2009 15:30:00
1,477
90
Wait for one of several threads to finish?
I am implementing a thread pool. The work required by each thread is 1-10 seconds of CPU, so I'm happy to have a traditional thread pool with workers, or I'm happy to spawn a new thread for each unit of work. It doesn't matter. I would like to have some way for the master control thread to know when one of the N worker threads finishes its work and is ready for more (or its time to start another). I've looked at pthread_join and pthread_cond_wait. There doesn't seem to be a way to wait for one of N. So I thought about having the master thread have a variable that it uses to go to sleep and having the workers wake it up. This seems to work if the workers don't die. However, if they die, there's a window between the time that the worker wakes up the controller and the time it dies which I don't want to deal with. I've looked at Intel's TBB but it looks much more complicated than I need. Is there a simple equivalent in PTHREADS to WaitForMultipleObjects in Microsoft Windows?
pthreads
null
null
null
null
null
open
Wait for one of several threads to finish? === I am implementing a thread pool. The work required by each thread is 1-10 seconds of CPU, so I'm happy to have a traditional thread pool with workers, or I'm happy to spawn a new thread for each unit of work. It doesn't matter. I would like to have some way for the master control thread to know when one of the N worker threads finishes its work and is ready for more (or its time to start another). I've looked at pthread_join and pthread_cond_wait. There doesn't seem to be a way to wait for one of N. So I thought about having the master thread have a variable that it uses to go to sleep and having the workers wake it up. This seems to work if the workers don't die. However, if they die, there's a window between the time that the worker wakes up the controller and the time it dies which I don't want to deal with. I've looked at Intel's TBB but it looks much more complicated than I need. Is there a simple equivalent in PTHREADS to WaitForMultipleObjects in Microsoft Windows?
0
9,148,571
02/05/2012 10:40:25
1,190,484
02/05/2012 10:34:45
1
0
PHP Parse SimpleXMLElement
I have the below simplexmlelement and cannot for the life of me get the data i am after. I need to get InvoiceNumber, AmountDue, and AmountPaid. Am using PHP Can someone assist? SimpleXMLElement Object ( [Id] => 8d734319-1c32-429b-ad40-cd90187dba46 [Status] => OK [ProviderName] => Provider [DateTimeUTC] => 2012-02-05T09:56:36.8702687Z [Invoices] => SimpleXMLElement Object ( [Invoice] => Array ( [0] => SimpleXMLElement Object ( [Contact] => SimpleXMLElement Object ( [ContactID] => d36f2020-6d1d-476d-8781-fcf531dd03fb [Name] => Cash ) [Date] => 2011-11-01T00:00:00 [DueDate] => 2011-11-01T00:00:00 [Status] => PAID [LineAmountTypes] => Inclusive [SubTotal] => 6693.59 [TotalTax] => 669.36 [Total] => 7362.95 [UpdatedDateUTC] => 2012-01-05T10:03:19.287 [CurrencyCode] => AUD [FullyPaidOnDate] => 2011-11-01T00:00:00 [Type] => ACCREC [InvoiceID] => 068db0cc-343d-4a0d-95a9-b29d76360ab0 [InvoiceNumber] => INV-0002 [Reference] => Nov2011 [Payments] => SimpleXMLElement Object ( [Payment] => SimpleXMLElement Object ( [PaymentID] => a3ee88cc-c65d-4c6b-808d-72e109e65dd5 [Date] => 2011-11-01T00:00:00 [Amount] => 7362.95 [Reference] => Nov2011 [CurrencyRate] => 1.000000 ) ) [AmountDue] => 0.00 [AmountPaid] => 7362.95 )
php
xml
null
null
null
02/05/2012 21:35:02
too localized
PHP Parse SimpleXMLElement === I have the below simplexmlelement and cannot for the life of me get the data i am after. I need to get InvoiceNumber, AmountDue, and AmountPaid. Am using PHP Can someone assist? SimpleXMLElement Object ( [Id] => 8d734319-1c32-429b-ad40-cd90187dba46 [Status] => OK [ProviderName] => Provider [DateTimeUTC] => 2012-02-05T09:56:36.8702687Z [Invoices] => SimpleXMLElement Object ( [Invoice] => Array ( [0] => SimpleXMLElement Object ( [Contact] => SimpleXMLElement Object ( [ContactID] => d36f2020-6d1d-476d-8781-fcf531dd03fb [Name] => Cash ) [Date] => 2011-11-01T00:00:00 [DueDate] => 2011-11-01T00:00:00 [Status] => PAID [LineAmountTypes] => Inclusive [SubTotal] => 6693.59 [TotalTax] => 669.36 [Total] => 7362.95 [UpdatedDateUTC] => 2012-01-05T10:03:19.287 [CurrencyCode] => AUD [FullyPaidOnDate] => 2011-11-01T00:00:00 [Type] => ACCREC [InvoiceID] => 068db0cc-343d-4a0d-95a9-b29d76360ab0 [InvoiceNumber] => INV-0002 [Reference] => Nov2011 [Payments] => SimpleXMLElement Object ( [Payment] => SimpleXMLElement Object ( [PaymentID] => a3ee88cc-c65d-4c6b-808d-72e109e65dd5 [Date] => 2011-11-01T00:00:00 [Amount] => 7362.95 [Reference] => Nov2011 [CurrencyRate] => 1.000000 ) ) [AmountDue] => 0.00 [AmountPaid] => 7362.95 )
3
7,832,016
10/20/2011 06:36:15
958,606
09/22/2011 08:11:38
22
0
Days should be added based on the integer values
in these int days i will get the integer value. another variable eg Totalhours :"40:00" if (oddt.Rows.Count > 0) { int days = Convert.ToInt32(oddt.Rows["fltOD"]); } for eg:if value returns as 1 means it should add 8 hours in this total hours string and display as Totalhours : "48:00" if the values returns as 2 means it should add 16 hours in this taotal hours string and display as totalhours :"56:00" if the values returns as 0.5 means it should add 16 hours in this taotal hours string and display as totalhours :"44:00" like this dynamically based on the value returns in this int days it should be added.
c#
null
null
null
null
10/20/2011 10:45:59
not a real question
Days should be added based on the integer values === in these int days i will get the integer value. another variable eg Totalhours :"40:00" if (oddt.Rows.Count > 0) { int days = Convert.ToInt32(oddt.Rows["fltOD"]); } for eg:if value returns as 1 means it should add 8 hours in this total hours string and display as Totalhours : "48:00" if the values returns as 2 means it should add 16 hours in this taotal hours string and display as totalhours :"56:00" if the values returns as 0.5 means it should add 16 hours in this taotal hours string and display as totalhours :"44:00" like this dynamically based on the value returns in this int days it should be added.
1
2,196,258
02/03/2010 23:16:12
265,760
02/03/2010 23:16:12
1
0
Xslt and multi-line text (Sitecore)
I have a field in item (multi-line text) which i output in my xslt rendering. The problem is that carrigae return are not shown in my output - what do i need to do to make my xslt output show the carrigae returns?
xslt
sitecore
multi-line
null
null
null
open
Xslt and multi-line text (Sitecore) === I have a field in item (multi-line text) which i output in my xslt rendering. The problem is that carrigae return are not shown in my output - what do i need to do to make my xslt output show the carrigae returns?
0
7,633,118
10/03/2011 09:21:39
897,152
08/16/2011 17:04:30
4
0
Need a design idea [in java]
I Have a store and there exists many objects. Periodically i need to clean the store by dispatching the objects in it to another store. When Iam cleaning the store, some of its object might be already in use (Other threads might be using the object to update its values). I Can't wait until the other thread release the reference since, its a continuous process. So, some other object might now get Already in Use stage. I cant't make the Store synchronized since threads creating new objects should not made to wait. I need some design ideas to achieve proper cleaning of store.
java
design
null
null
null
10/03/2011 12:04:45
not a real question
Need a design idea [in java] === I Have a store and there exists many objects. Periodically i need to clean the store by dispatching the objects in it to another store. When Iam cleaning the store, some of its object might be already in use (Other threads might be using the object to update its values). I Can't wait until the other thread release the reference since, its a continuous process. So, some other object might now get Already in Use stage. I cant't make the Store synchronized since threads creating new objects should not made to wait. I need some design ideas to achieve proper cleaning of store.
1
8,511,428
12/14/2011 20:48:41
663,456
03/16/2011 23:52:28
1,231
69
What do people find difficult about function pointers?
Only few people are using function pointers in C. Yet, using function pointers to encode complexity has some beneficial properties, partly described in Rob Pike's <a href="http://www.lysator.liu.se/c/pikestyle.html">Notes on Programming in C</a> back in 1989. * When passed as parameters to other functions, function pointers enable the distribution of complexity and allow for a more concise API. The C standard library's `qsort()` function is a good example. `qsort()` would have to be a whole family of functions, if it weren't for function pointers. * Also, function pointers allow for an easy delegation of code execution during runtime. `atexit()` comes to mind, but there are far more sophisticated scenarios, e.g. data-driven programs using function pointers. * And lastly, function pointers are sometimes used to implement callbacks, which is probably the most prominent example. Of course, it's possible to come up with examples that may serve as arguments in a debate against function pointers, e.g. array-of-functions-accepting-(pointer-to-function-accepting-int-and-returning-pointer-to-function)-and-returning-(pointer-to-pointer-to-function-accepting-int-and-returning-pointer-to-what-I-just-described). But the same holds true for, say, macros, yet they are widely used. So, why is it that we don't see function pointers more often? (I'm not trying to be argumentative or subjective, I just want to know why function pointers tend to be avoided)
c
design
pointers
function-pointers
programming-techniques
12/14/2011 20:54:23
not constructive
What do people find difficult about function pointers? === Only few people are using function pointers in C. Yet, using function pointers to encode complexity has some beneficial properties, partly described in Rob Pike's <a href="http://www.lysator.liu.se/c/pikestyle.html">Notes on Programming in C</a> back in 1989. * When passed as parameters to other functions, function pointers enable the distribution of complexity and allow for a more concise API. The C standard library's `qsort()` function is a good example. `qsort()` would have to be a whole family of functions, if it weren't for function pointers. * Also, function pointers allow for an easy delegation of code execution during runtime. `atexit()` comes to mind, but there are far more sophisticated scenarios, e.g. data-driven programs using function pointers. * And lastly, function pointers are sometimes used to implement callbacks, which is probably the most prominent example. Of course, it's possible to come up with examples that may serve as arguments in a debate against function pointers, e.g. array-of-functions-accepting-(pointer-to-function-accepting-int-and-returning-pointer-to-function)-and-returning-(pointer-to-pointer-to-function-accepting-int-and-returning-pointer-to-what-I-just-described). But the same holds true for, say, macros, yet they are widely used. So, why is it that we don't see function pointers more often? (I'm not trying to be argumentative or subjective, I just want to know why function pointers tend to be avoided)
4
10,798,886
05/29/2012 12:10:37
1,400,941
05/17/2012 12:15:11
3
0
Trying a web service multiple times - PHP
I'm building a function which interacts with a web service. In the case where there is no response from the web service I want to retry 2 or 3 times incase it's a temporary glitch and before registering a failure. Using PHP what would be the best technique for doing this?
php
web-services
null
null
null
05/29/2012 18:15:57
not a real question
Trying a web service multiple times - PHP === I'm building a function which interacts with a web service. In the case where there is no response from the web service I want to retry 2 or 3 times incase it's a temporary glitch and before registering a failure. Using PHP what would be the best technique for doing this?
1
5,507,695
03/31/2011 23:41:33
627,729
02/22/2011 04:57:39
8
1
How do I determine which GNU Info Manual files are available?
I would like Info manuals on various things, including command line utilities, ruby, git, etc. Does anyone know of a database of them? I would rather not go through Googling each item to try to find a Texinfo or Info file or determine whether there is a tool that can generate such a file from existing documentation or source files.
emacs
info
texinfo
null
null
null
open
How do I determine which GNU Info Manual files are available? === I would like Info manuals on various things, including command line utilities, ruby, git, etc. Does anyone know of a database of them? I would rather not go through Googling each item to try to find a Texinfo or Info file or determine whether there is a tool that can generate such a file from existing documentation or source files.
0
4,527,614
12/24/2010 17:46:53
394,094
07/16/2010 16:22:04
212
17
Have you put a Holiday themed easter egg in your project?
Have you ever hidden, or are you now hiding, a Holiday themed Easter Egg in your project?
christmas
null
null
null
null
12/24/2010 18:12:59
off topic
Have you put a Holiday themed easter egg in your project? === Have you ever hidden, or are you now hiding, a Holiday themed Easter Egg in your project?
2
10,998,652
06/12/2012 14:22:02
1,135,881
01/07/2012 11:27:25
6
0
c# Spider / Scraper
I am willing to scrape a website links, that means link of all sub-pages too. How to find out all sub-pages(internal pages) of a website. I can scrape all links of web page but it is very complex to scrape all internal pages of website. Any advise or suggestion please. Thanks
c#
.net
vb.net
null
null
06/12/2012 20:32:55
not a real question
c# Spider / Scraper === I am willing to scrape a website links, that means link of all sub-pages too. How to find out all sub-pages(internal pages) of a website. I can scrape all links of web page but it is very complex to scrape all internal pages of website. Any advise or suggestion please. Thanks
1
2,330,131
02/24/2010 22:29:09
280,755
02/24/2010 22:29:09
1
0
Video resources for learning to use ASP.NET with a database.
**Can you recommend any good video resources for learning to use ASP.NET with a database?** I come from a PHP/MySQL background and it seems that Visual Studio does too much magic for me to wrap my head around using written material.
visual-studio
asp.net
database
null
null
null
open
Video resources for learning to use ASP.NET with a database. === **Can you recommend any good video resources for learning to use ASP.NET with a database?** I come from a PHP/MySQL background and it seems that Visual Studio does too much magic for me to wrap my head around using written material.
0
9,887,621
03/27/2012 10:20:24
1,295,180
03/27/2012 10:03:56
1
0
Accessing localhost of PC from USB connected Android mobile device
I have an android device (Samsung galaxy tab) connected to my PC via USB . I want to use WebServices and run a web page which is located on my local xampp server of my PC on my android device . I can achieve it if I have both , my PC and android device , connected on the same wireless network . However is it possible to access the localhost page without any wireless connection , using only USB connection . (PS : This same scenario works when I run the app on an emulator and use the ip 10.0.2.2 to access the localhost on my PC)
android
null
null
null
null
null
open
Accessing localhost of PC from USB connected Android mobile device === I have an android device (Samsung galaxy tab) connected to my PC via USB . I want to use WebServices and run a web page which is located on my local xampp server of my PC on my android device . I can achieve it if I have both , my PC and android device , connected on the same wireless network . However is it possible to access the localhost page without any wireless connection , using only USB connection . (PS : This same scenario works when I run the app on an emulator and use the ip 10.0.2.2 to access the localhost on my PC)
0
9,089,201
02/01/2012 00:39:51
558,906
12/31/2010 02:52:23
62
0
Examples of constructing network packet
I am trying to learn the various endianness and bit-fiddling issues involved in dealing with network packets. What if I am to replace the VLAN header of an ethernet frame for example or do some checksum operations based on changed TTL value of IP packet etc. I am looking for examples in open-source code (in C), tutorials or anything relevant in general. Thank you. PS: If this is not a stackoverflow question, please let me know and I'll delete the question if needed.
c
network-programming
null
null
null
02/01/2012 08:21:11
not a real question
Examples of constructing network packet === I am trying to learn the various endianness and bit-fiddling issues involved in dealing with network packets. What if I am to replace the VLAN header of an ethernet frame for example or do some checksum operations based on changed TTL value of IP packet etc. I am looking for examples in open-source code (in C), tutorials or anything relevant in general. Thank you. PS: If this is not a stackoverflow question, please let me know and I'll delete the question if needed.
1
11,540,290
07/18/2012 11:29:32
1,316,726
04/06/2012 04:01:45
1
0
How can I stop the automatic string to number conversion in perl?
Well, when I named a folder with "4.0" in backup and store the name in database. When I get it from the database using perl, I changed to "4". How can I stop the automatic conversion?
perl
null
null
null
null
07/19/2012 01:58:37
not a real question
How can I stop the automatic string to number conversion in perl? === Well, when I named a folder with "4.0" in backup and store the name in database. When I get it from the database using perl, I changed to "4". How can I stop the automatic conversion?
1
11,575,529
07/20/2012 08:21:25
1,465,910
06/19/2012 09:02:11
71
3
Connect to an online SQL database in Android
I am developing my android app which interacts with an external MSSQL database (SQL server 2005). But dont have any clue on how to make that possible...o I referred some articles like.. http://stackoverflow.com/questions/9493822/android-java-connect-to-online-database https://groups.google.com/forum/?fromgroups#!topic/android-developers/9KCkhHP2_RY https://groups.google.com/forum/?fromgroups#!topic/phonegap/YCRt2HducKg but couldn't get it through. can anyone plz explain me how can i make it possible with some basic tutorials or code. Thanks in advance.
android
database
sql-server-2005
online
null
07/20/2012 12:39:51
not a real question
Connect to an online SQL database in Android === I am developing my android app which interacts with an external MSSQL database (SQL server 2005). But dont have any clue on how to make that possible...o I referred some articles like.. http://stackoverflow.com/questions/9493822/android-java-connect-to-online-database https://groups.google.com/forum/?fromgroups#!topic/android-developers/9KCkhHP2_RY https://groups.google.com/forum/?fromgroups#!topic/phonegap/YCRt2HducKg but couldn't get it through. can anyone plz explain me how can i make it possible with some basic tutorials or code. Thanks in advance.
1
9,695,506
03/14/2012 03:30:05
676,424
03/25/2011 09:23:28
175
3
Using element.style.color within firefox
I have the following JavaScript function which changes text within an element, and as a bit of housecleaning also wants to ensure that the text is readable. As such, I set a white colour for dark backgrounds, or a black colour otherwise. Now the code works as expected on IE9 and Chrome, but for some reason doesn't correctly change the color property on Firefox. Why is this? Is my way of accessing the color property not supported in Firefox? function setTextContent(element, text) { while (element.firstChild!==null) element.removeChild(element.firstChild); // remove all existing content element.appendChild(document.createTextNode(text)); if (element.style.backgroundColor == "black" || element.style.backgroundColor == "purple" || element.style.backgroundColor == "blue") { element.style.color = "white"; } else { element.style.color = "black"; } }
javascript
html
null
null
null
null
open
Using element.style.color within firefox === I have the following JavaScript function which changes text within an element, and as a bit of housecleaning also wants to ensure that the text is readable. As such, I set a white colour for dark backgrounds, or a black colour otherwise. Now the code works as expected on IE9 and Chrome, but for some reason doesn't correctly change the color property on Firefox. Why is this? Is my way of accessing the color property not supported in Firefox? function setTextContent(element, text) { while (element.firstChild!==null) element.removeChild(element.firstChild); // remove all existing content element.appendChild(document.createTextNode(text)); if (element.style.backgroundColor == "black" || element.style.backgroundColor == "purple" || element.style.backgroundColor == "blue") { element.style.color = "white"; } else { element.style.color = "black"; } }
0
2,582,059
04/06/2010 01:04:30
201,903
11/03/2009 17:15:55
441
5
Ruby: How can I have a Hash take multiple keys?
I'm taking 5 strings (protocol, source IP and port, destination IP and port) and using them to store some values in a hash. The problem is that if the IPs or ports are switched between source and destination, the key is supposed to be the same. If I was doing this in C#/Java/whatever I'd have to create a new class and overwrite the hashcode()/equals() methods, but that seems error prone from the little I've read about it and I was wondering if there would be a better alternative here.
ruby
hash
null
null
null
null
open
Ruby: How can I have a Hash take multiple keys? === I'm taking 5 strings (protocol, source IP and port, destination IP and port) and using them to store some values in a hash. The problem is that if the IPs or ports are switched between source and destination, the key is supposed to be the same. If I was doing this in C#/Java/whatever I'd have to create a new class and overwrite the hashcode()/equals() methods, but that seems error prone from the little I've read about it and I was wondering if there would be a better alternative here.
0
6,529,659
06/30/2011 03:29:00
304,461
03/29/2010 18:04:38
832
69
Wait for QueueUserWorkItem to Complete
If I add jobs to the thread pool with `QueueUserWorkItem`... how do I keep my program from going forward until all jobs are completed? I know I could add some logic to keep the app from running until all jobs are completed, but I want to know if there is something like `Thread.Join()` or if there's any way to retrieve each thread that is being assigned a job.
.net
multithreading
null
null
null
null
open
Wait for QueueUserWorkItem to Complete === If I add jobs to the thread pool with `QueueUserWorkItem`... how do I keep my program from going forward until all jobs are completed? I know I could add some logic to keep the app from running until all jobs are completed, but I want to know if there is something like `Thread.Join()` or if there's any way to retrieve each thread that is being assigned a job.
0
1,891,190
12/11/2009 22:10:04
93,468
02/03/2009 22:24:01
1,162
32
Operator '&&' cannot be applied to operands of type 'bool'
if ((!s.IsValidCashFlow) && (s.Cash.InvalidCashFlowReason == InvalidCashFlowReason.IAmAPoorMF)) I guess you can't do this in C#? isValidCashFlow is a bool property
c#
null
null
null
null
12/12/2011 19:50:37
too localized
Operator '&&' cannot be applied to operands of type 'bool' === if ((!s.IsValidCashFlow) && (s.Cash.InvalidCashFlowReason == InvalidCashFlowReason.IAmAPoorMF)) I guess you can't do this in C#? isValidCashFlow is a bool property
3
7,154,822
08/22/2011 23:37:27
826,510
07/03/2011 01:16:57
81
6
the next step after mastering php and ajax?
i spent more than 10 years for now learning and using php as my main development language . im aware of a lot key features and weakness points of php but i think its the moment to move and learn another language. for now im very concern about my next step . i really don't know what should i learn ? i put some points for the language i should learn like : 1. market needs similar to php can be integrated with within my php applications in case i need that. supporting fully OOP i found my results are close to perl , java and C# what i need now is some advice's regarding those 3 languages which will be better for me ? and the main point that i would need to master this language in at most 6 to 8 months of study no more. thank you
c#
java
php
perl
null
08/22/2011 23:46:29
not constructive
the next step after mastering php and ajax? === i spent more than 10 years for now learning and using php as my main development language . im aware of a lot key features and weakness points of php but i think its the moment to move and learn another language. for now im very concern about my next step . i really don't know what should i learn ? i put some points for the language i should learn like : 1. market needs similar to php can be integrated with within my php applications in case i need that. supporting fully OOP i found my results are close to perl , java and C# what i need now is some advice's regarding those 3 languages which will be better for me ? and the main point that i would need to master this language in at most 6 to 8 months of study no more. thank you
4
3,914,099
10/12/2010 11:22:48
471,516
10/10/2010 12:32:29
34
0
Possible to comment-out JSTL code?
If you want to temporarily comment-out a piece of JSTL code that you may re-enable later, is this possible? Would this work? <!--<c:out value="${someVar}"/>-->
java
jsp
jstl
comments
null
null
open
Possible to comment-out JSTL code? === If you want to temporarily comment-out a piece of JSTL code that you may re-enable later, is this possible? Would this work? <!--<c:out value="${someVar}"/>-->
0
2,517,607
03/25/2010 16:56:02
187,532
10/10/2009 03:31:57
48
0
Android:Playing bigger size audio wav sound file produces crash
I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(10kb, 20 kb files etc) very well. P.S: I should play PCM(.wav) buffer sound, the reason behind why i use AudioTrack here. Though my device has lesser memory, how would i read bigger audio files bytes by bytes and play the sound to avoid crashing due to memory constraints. private void AudioTrackPlayPCM() throws IOException { String filePath = "/sdcard/myWav.wav"; // 8 kb file byte[] byteData = null; File file = null; file = new File(filePath); byteData = new byte[(int) file.length()]; FileInputStream in = null; try { in = new FileInputStream( file ); in.read( byteData ); in.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } int intSize = android.media.AudioTrack.getMinBufferSize(8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT); AudioTrack at = new AudioTrack(AudioManager.STREAM_MUSIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, intSize, AudioTrack.MODE_STREAM); at.play(); at.write(byteData, 0, byteData.length); at.stop(); at.release(); } Could someone guide me please to play the AudioTrack code for bigger size wav files?
android
null
null
null
null
null
open
Android:Playing bigger size audio wav sound file produces crash === I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(10kb, 20 kb files etc) very well. P.S: I should play PCM(.wav) buffer sound, the reason behind why i use AudioTrack here. Though my device has lesser memory, how would i read bigger audio files bytes by bytes and play the sound to avoid crashing due to memory constraints. private void AudioTrackPlayPCM() throws IOException { String filePath = "/sdcard/myWav.wav"; // 8 kb file byte[] byteData = null; File file = null; file = new File(filePath); byteData = new byte[(int) file.length()]; FileInputStream in = null; try { in = new FileInputStream( file ); in.read( byteData ); in.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } int intSize = android.media.AudioTrack.getMinBufferSize(8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT); AudioTrack at = new AudioTrack(AudioManager.STREAM_MUSIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, intSize, AudioTrack.MODE_STREAM); at.play(); at.write(byteData, 0, byteData.length); at.stop(); at.release(); } Could someone guide me please to play the AudioTrack code for bigger size wav files?
0
8,417,537
12/07/2011 15:09:10
305,410
03/30/2010 19:09:02
119
6
Use MPMoviePlayerViewController interface on device while movie on big screen
I want to implement external screen suppor for my iOS app and want to use the standard playback interface of the MPMoviePlayerViewController, i.e. use this 'good' slider with 50, 25% scrubbing and so on... So far, I tried the following: present the mpmovieplayerviewcontroller with the right movie and then just add the controller.moviePlayer.view to the external screen window, but it results in a black screen on the tv after 1/2 second video... Is there any possibility how I can use the standard controls on the phone while playing on the external screen? Thanks in advance, Christian
ios
mpmovieplayercontroller
media
null
null
null
open
Use MPMoviePlayerViewController interface on device while movie on big screen === I want to implement external screen suppor for my iOS app and want to use the standard playback interface of the MPMoviePlayerViewController, i.e. use this 'good' slider with 50, 25% scrubbing and so on... So far, I tried the following: present the mpmovieplayerviewcontroller with the right movie and then just add the controller.moviePlayer.view to the external screen window, but it results in a black screen on the tv after 1/2 second video... Is there any possibility how I can use the standard controls on the phone while playing on the external screen? Thanks in advance, Christian
0
2,668,307
04/19/2010 14:40:44
22,763
09/26/2008 16:24:46
153
12
Regex for tollfree numbers in java
I have this regex to test for telephone # that should be a toll free. public static final Pattern patternTollFree = Pattern.compile("^((877)|(800)|(866)|(888))"); So I only want to get those # where the user may have left the 1 off of the front of the string, but I have tried several things and I can't get java to match. public String changeRingTo( String changedRinger ) { if ( null == changedRinger || changedRinger.length() != 10) return changedRinger; if ( patternTollFree.matcher(changedRinger).region(0, 2).matches() ) changedRinger = '1' + changedRinger; return changedRinger; } I can't get this 2nd test case below to succeed. What am I doing wrong? assertEquals( "Regex not working", "8189091000", of.changeRingTo("8189091000")); assertEquals( "Regex not working", "18769091000", of.changeRingTo("8769091000"));
java
regex
null
null
null
null
open
Regex for tollfree numbers in java === I have this regex to test for telephone # that should be a toll free. public static final Pattern patternTollFree = Pattern.compile("^((877)|(800)|(866)|(888))"); So I only want to get those # where the user may have left the 1 off of the front of the string, but I have tried several things and I can't get java to match. public String changeRingTo( String changedRinger ) { if ( null == changedRinger || changedRinger.length() != 10) return changedRinger; if ( patternTollFree.matcher(changedRinger).region(0, 2).matches() ) changedRinger = '1' + changedRinger; return changedRinger; } I can't get this 2nd test case below to succeed. What am I doing wrong? assertEquals( "Regex not working", "8189091000", of.changeRingTo("8189091000")); assertEquals( "Regex not working", "18769091000", of.changeRingTo("8769091000"));
0
6,144,924
05/26/2011 20:53:01
772,039
05/26/2011 20:53:01
1
0
WCF: How to Get Original Context when Client Disconnects/Faults
I have a request-reply service method that processes a transaction against the database and returns a response message with a transaction id. It is possible for a client to unexpectedly disconnect/fault before it receives the response, in which case the service will get a channel_faulted event. My question is, how can I get the original transaction id (that was in the outgoing response) in the channel_faulted event, in order to rollback/reverse that transaction that the client did not receive? Any help is appreciated. Thanks.
wcf
null
null
null
null
null
open
WCF: How to Get Original Context when Client Disconnects/Faults === I have a request-reply service method that processes a transaction against the database and returns a response message with a transaction id. It is possible for a client to unexpectedly disconnect/fault before it receives the response, in which case the service will get a channel_faulted event. My question is, how can I get the original transaction id (that was in the outgoing response) in the channel_faulted event, in order to rollback/reverse that transaction that the client did not receive? Any help is appreciated. Thanks.
0
10,772,362
05/27/2012 07:30:01
911,717
08/25/2011 09:41:15
18
0
Android i wrote download mp3 file from server some error in my code
Error: java.io.FileNotFoundException: /mnt/sdcard/sura-001.mp3 (Permission denied)
java
android
save
mp3
raw
05/27/2012 07:51:32
not a real question
Android i wrote download mp3 file from server some error in my code === Error: java.io.FileNotFoundException: /mnt/sdcard/sura-001.mp3 (Permission denied)
1
10,896,949
06/05/2012 12:02:21
1,436,526
06/05/2012 04:45:06
1
0
Dragable DIV using javascript
I want to make Dragable div i know this can be done using Jquery plug in but i don't want to use because i just need only dragable function. so tell me how can i make dragable function i have did this $(document).ready(function(e){ $("#eve").mousemove(function(e){ var p=$(this); var offset = p.offset(); var ol=offset.left; var ot=offset.top; var l=e.pageX-ol; var t=e.pageY-ot; var eX=e.pageX; var eY=e.pageY; var htm="left:"+ol+" top:"+ot+"<br/>"; htm+="eX:"+eX+" eY:"+eY+"<br/>"; htm+="curX:"+l+" curY:"+t+"<br/>"; htm+="l:"+(ol-l)+" t:"+(ot-t); p.html(htm); p.css({left:((eX-3))+"px",top:((eY-3))+"px"}); });
javascript
jquery
null
null
null
06/06/2012 07:16:05
not a real question
Dragable DIV using javascript === I want to make Dragable div i know this can be done using Jquery plug in but i don't want to use because i just need only dragable function. so tell me how can i make dragable function i have did this $(document).ready(function(e){ $("#eve").mousemove(function(e){ var p=$(this); var offset = p.offset(); var ol=offset.left; var ot=offset.top; var l=e.pageX-ol; var t=e.pageY-ot; var eX=e.pageX; var eY=e.pageY; var htm="left:"+ol+" top:"+ot+"<br/>"; htm+="eX:"+eX+" eY:"+eY+"<br/>"; htm+="curX:"+l+" curY:"+t+"<br/>"; htm+="l:"+(ol-l)+" t:"+(ot-t); p.html(htm); p.css({left:((eX-3))+"px",top:((eY-3))+"px"}); });
1
11,092,697
06/18/2012 23:59:37
159,145
08/19/2009 10:32:19
1,060
53
C++/Win32 - Convert flags integer to human-readable string
In Win32 there's a lot of places where flags values are specified with DWORD values that are made by performing a bitwise OR of #defined constants. However when it comes to running the program and debugging it, it can become a pain to take apart generated flag values back to their #define symbols (which is why I like enum types). Short of reimplementing Win32's functions and structs to use enums instead of constants, is there an easy and painless way to automatically convert from integer flags values back to a string representation of their components? Such as converting 192 to "FLAG_FOO | FLAG_BAR" (where FLAG_FOO is 128 and FLAG_BAR is 64).
c++
winapi
flags
null
null
null
open
C++/Win32 - Convert flags integer to human-readable string === In Win32 there's a lot of places where flags values are specified with DWORD values that are made by performing a bitwise OR of #defined constants. However when it comes to running the program and debugging it, it can become a pain to take apart generated flag values back to their #define symbols (which is why I like enum types). Short of reimplementing Win32's functions and structs to use enums instead of constants, is there an easy and painless way to automatically convert from integer flags values back to a string representation of their components? Such as converting 192 to "FLAG_FOO | FLAG_BAR" (where FLAG_FOO is 128 and FLAG_BAR is 64).
0
11,527,205
07/17/2012 16:52:49
966,276
09/27/2011 04:47:34
6
0
How common are firewalls that inspect packets and only pass HTTP?
We're building a desktop application that sends and receives protobuf messages to our servers on TCP port 80. However, if it's common for firewalls to block non-HTTP traffic, then we'll have to encode our messages in Base64 inside HTTP messages. We'd love to avoid this because HTTP and Base64 adds extraneous bytes, and a little complexity. But we'll have to do it if there are a significant number of deployed firewalls that would otherwise block our traffic. Does anyone have a sense of how common it is for firewalls to block non-http traffic?
http
tcp
firewall
null
null
07/18/2012 05:09:53
off topic
How common are firewalls that inspect packets and only pass HTTP? === We're building a desktop application that sends and receives protobuf messages to our servers on TCP port 80. However, if it's common for firewalls to block non-HTTP traffic, then we'll have to encode our messages in Base64 inside HTTP messages. We'd love to avoid this because HTTP and Base64 adds extraneous bytes, and a little complexity. But we'll have to do it if there are a significant number of deployed firewalls that would otherwise block our traffic. Does anyone have a sense of how common it is for firewalls to block non-http traffic?
2
10,263,110
04/21/2012 21:21:15
994,283
10/13/2011 20:16:10
28
7
iOS 5 blocks crash only with Release Build
I have using blocks and ARC, and found in some situation, iOS only crash in Release build. It was wrong way to write code, like this. -(IBAction)clickedButtonA:(UIBarButtonItem*)sender event:(UIEvent*)event { NSMutableArray *arrRows = [NSMutableArray arrayWithCapacity:0]; #warning this code only crash on Release Build.... Don't use this NSMutableDictionary * dicRow = [NSMutableDictionary dictionaryWithCapacity:0]; [arrRows addObject:dicRow]; dispatch_block_t block = ^{ NSString *str = [NSString stringWithFormat:@"%@",[_tweet valueForKey:@"text"]]; [[UIPasteboard generalPasteboard] setString:str]; }; [dicRow setValue:block forKey:kDicKeyLinkPopBlock]; NSMutableArray *sections = [NSMutableArray arrayWithObject:arrRows]; TOVLinkPopoverViewController *controller= [[TOVLinkPopoverViewController alloc] init]; controller.arrayLink = sections; } And from other controller, when I access the block, it crashes only I am on release build. I have learn you need to copy the block [dicRow setValue:[block copy] forKey:kDicKeyLinkPopBlock]; For non-block aware Class like NSMutableDictionary. The question is "Why it only crashes on Release build?" I know this "should crash", and this was wrong way of using block, but hoping it crashes on Debug build so we can find this kind of bug earlier. One more question is "Is there any build setting that makes this code crash with debug build?" You can ran sample code from gitHub, https://github.com/tomohisa/iOS_PopoverMenu_Notification See ViewController.m and find commented out code (only crash on release).
ios5
objective-c-blocks
arc
null
null
null
open
iOS 5 blocks crash only with Release Build === I have using blocks and ARC, and found in some situation, iOS only crash in Release build. It was wrong way to write code, like this. -(IBAction)clickedButtonA:(UIBarButtonItem*)sender event:(UIEvent*)event { NSMutableArray *arrRows = [NSMutableArray arrayWithCapacity:0]; #warning this code only crash on Release Build.... Don't use this NSMutableDictionary * dicRow = [NSMutableDictionary dictionaryWithCapacity:0]; [arrRows addObject:dicRow]; dispatch_block_t block = ^{ NSString *str = [NSString stringWithFormat:@"%@",[_tweet valueForKey:@"text"]]; [[UIPasteboard generalPasteboard] setString:str]; }; [dicRow setValue:block forKey:kDicKeyLinkPopBlock]; NSMutableArray *sections = [NSMutableArray arrayWithObject:arrRows]; TOVLinkPopoverViewController *controller= [[TOVLinkPopoverViewController alloc] init]; controller.arrayLink = sections; } And from other controller, when I access the block, it crashes only I am on release build. I have learn you need to copy the block [dicRow setValue:[block copy] forKey:kDicKeyLinkPopBlock]; For non-block aware Class like NSMutableDictionary. The question is "Why it only crashes on Release build?" I know this "should crash", and this was wrong way of using block, but hoping it crashes on Debug build so we can find this kind of bug earlier. One more question is "Is there any build setting that makes this code crash with debug build?" You can ran sample code from gitHub, https://github.com/tomohisa/iOS_PopoverMenu_Notification See ViewController.m and find commented out code (only crash on release).
0
9,906,390
03/28/2012 11:18:22
388,324
08/31/2009 07:02:36
83
6
Which CMS shoudl i use and why?
I have encountered three CMS until now. (1) Alfresco (2) Liferay (3) Magnolia But i can not compare them. means amongst three to which i should continue... if anyone experience of threes can compare me. which is the best according to (1) Simplicity (2) Documentation & Books , tutorials (3) Customization (4) templates (5) integration (means to Strut , tile, sprint , Apache axis etc.) (6) price (7) community (8) Configuration Management support **I want to use a cms from one of them according your opinion to develope a very large scale websites which will continue to evolve for at least 5 years. so i am confused to start of one of them. so anyone please guide me and share experience. which should i use and why ??** Thank You Mihir Parekh
liferay
alfresco
magnolia
null
null
03/28/2012 13:03:14
not constructive
Which CMS shoudl i use and why? === I have encountered three CMS until now. (1) Alfresco (2) Liferay (3) Magnolia But i can not compare them. means amongst three to which i should continue... if anyone experience of threes can compare me. which is the best according to (1) Simplicity (2) Documentation & Books , tutorials (3) Customization (4) templates (5) integration (means to Strut , tile, sprint , Apache axis etc.) (6) price (7) community (8) Configuration Management support **I want to use a cms from one of them according your opinion to develope a very large scale websites which will continue to evolve for at least 5 years. so i am confused to start of one of them. so anyone please guide me and share experience. which should i use and why ??** Thank You Mihir Parekh
4