PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
6,890,906
07/31/2011 16:59:49
667,355
03/19/2011 14:04:57
64
0
Name of file and its suffix
Is suffix ( for example .jpg or ,txt ) a part of file name ? for example I have this file : "picture.jpg", what is file name in this file ? thanks
c++
qt
qt4
null
null
08/01/2011 04:48:14
off topic
Name of file and its suffix === Is suffix ( for example .jpg or ,txt ) a part of file name ? for example I have this file : "picture.jpg", what is file name in this file ? thanks
2
4,419,537
12/11/2010 23:23:40
287,893
03/06/2010 19:39:18
2,527
20
Enhanced for loop in 2D Array - JavaScript
I created the following 2D array in Javascript // Create basic linear array var ImgArray = new Array(4); // Do the 2D array for each or the linear array slots for (i=0; i < 4 ; i++) { ImgArray[i] = new Array(4) } Now i want to iterate through it using 2 ' enhanced for loops'. But am stuck on how to use the loop as there is only `ImgArray` stated a such. For example; // Load the images for(var i in ImgArray) { for( ??? ) { // How would i do this? What do i state as an array? ///... } document.write("<br>"); } Any advise well appreciated
javascript
multidimensional-array
enhanced-for-loop
null
null
null
open
Enhanced for loop in 2D Array - JavaScript === I created the following 2D array in Javascript // Create basic linear array var ImgArray = new Array(4); // Do the 2D array for each or the linear array slots for (i=0; i < 4 ; i++) { ImgArray[i] = new Array(4) } Now i want to iterate through it using 2 ' enhanced for loops'. But am stuck on how to use the loop as there is only `ImgArray` stated a such. For example; // Load the images for(var i in ImgArray) { for( ??? ) { // How would i do this? What do i state as an array? ///... } document.write("<br>"); } Any advise well appreciated
0
5,826,157
04/28/2011 23:18:00
710,158
04/15/2011 16:08:08
6
0
C# image Processing
Whats is the meaning of delta in this equation ? Bmn = {(∑_θ∑_ρ〖H(θ,ρ)**δ**(n,[am+b] 〗 if abs(Sin(Theta )>sqrt(2)/2 ∑_θ∑_ρ〖H(θ,ρ)**δ**(m,[a1n+b1] 〗 if abs(Sin(Theta )≤sqrt(2)/2)┤ I got from http://idlastro.gsfc.nasa.gov/idl_html_help/Transforming_to_and_from_the_Hough_and_Radon_Domains.html Is it max or min or something different . Thanks in advance !
c#
image
processing
null
null
04/28/2011 23:47:20
off topic
C# image Processing === Whats is the meaning of delta in this equation ? Bmn = {(∑_θ∑_ρ〖H(θ,ρ)**δ**(n,[am+b] 〗 if abs(Sin(Theta )>sqrt(2)/2 ∑_θ∑_ρ〖H(θ,ρ)**δ**(m,[a1n+b1] 〗 if abs(Sin(Theta )≤sqrt(2)/2)┤ I got from http://idlastro.gsfc.nasa.gov/idl_html_help/Transforming_to_and_from_the_Hough_and_Radon_Domains.html Is it max or min or something different . Thanks in advance !
2
11,631,081
07/24/2012 12:40:05
1,400,652
05/17/2012 09:50:16
1
0
Java -Working in more than 2 tabs simultanously
When my project is running in one tab,it works correctly but when there are >2 tabs transaction goes wrong since i set all values in session.How to solve it when there are 2 different bookings in 2 tabs.
java
struct
null
null
null
07/24/2012 12:54:15
not a real question
Java -Working in more than 2 tabs simultanously === When my project is running in one tab,it works correctly but when there are >2 tabs transaction goes wrong since i set all values in session.How to solve it when there are 2 different bookings in 2 tabs.
1
2,336,596
02/25/2010 18:32:08
240,379
12/29/2009 18:45:32
21
0
How can I set specific CSS classes for links which are images?
This seems painfully simple, but I can't work out how to do it: I want every link on my site to have a specific style on mouseover, so I use a:hover { //style goes here } The thing is, I don't want that style applied to links that are images, but a:hover img { //reset style } doesn't work. What should I try instead?
css-selectors
null
null
null
null
null
open
How can I set specific CSS classes for links which are images? === This seems painfully simple, but I can't work out how to do it: I want every link on my site to have a specific style on mouseover, so I use a:hover { //style goes here } The thing is, I don't want that style applied to links that are images, but a:hover img { //reset style } doesn't work. What should I try instead?
0
10,448,366
05/04/2012 11:55:05
170,320
09/08/2009 17:16:23
155
11
ZF1 and dijit tab container the Zend_Dojo_Form does not show
I have a Zend_Dojo_Form built an want to show it in a view in this view it will be shown inside a tab container but the form is never shown althouht it appears in the code view, the dijit menu I have also disappears from the page. This only happens when I print the form inside the tab container , can't see nothing strange in the form. <script type="text/javascript"> dojo.require("dijit.layout.TabContainer"); dojo.require("dijit.layout.ContentPane"); </script> <?php $this->form->setAttrib("Height", "450px")->setAttrib("WIDTH", "550px"); ?> <div dojoType="dijit.layout.TabContainer" style="width: 600px; height: 400px;" tabPosition="left-h" tabStrip="true" doLayout="false"> <div dojoType="dijit.layout.ContentPane" title="Grupo: <?php print $this->idacgroup ?>" selected="true"> <span><?php print $this->form ?></span> </div> <div dojoType="dijit.layout.ContentPane" title="Anexar utilizador"> Lorem ipsum and all around - second... </div> <div dojoType="dijit.layout.ContentPane" title="Remover Utilizador"> Lorem ipsum and all around - last... </div> </div>
zend-framework
tabs
dojo
dijit
null
null
open
ZF1 and dijit tab container the Zend_Dojo_Form does not show === I have a Zend_Dojo_Form built an want to show it in a view in this view it will be shown inside a tab container but the form is never shown althouht it appears in the code view, the dijit menu I have also disappears from the page. This only happens when I print the form inside the tab container , can't see nothing strange in the form. <script type="text/javascript"> dojo.require("dijit.layout.TabContainer"); dojo.require("dijit.layout.ContentPane"); </script> <?php $this->form->setAttrib("Height", "450px")->setAttrib("WIDTH", "550px"); ?> <div dojoType="dijit.layout.TabContainer" style="width: 600px; height: 400px;" tabPosition="left-h" tabStrip="true" doLayout="false"> <div dojoType="dijit.layout.ContentPane" title="Grupo: <?php print $this->idacgroup ?>" selected="true"> <span><?php print $this->form ?></span> </div> <div dojoType="dijit.layout.ContentPane" title="Anexar utilizador"> Lorem ipsum and all around - second... </div> <div dojoType="dijit.layout.ContentPane" title="Remover Utilizador"> Lorem ipsum and all around - last... </div> </div>
0
5,794,675
04/26/2011 18:18:54
725,885
04/26/2011 18:03:12
1
0
Magento Purchase event trigger to access a script file and supplies inputed variables
I'm setting up an online store using Magento. One of the things purchasable will Mumble servers (ftp accounts and other web things will be done, but the main issue is mumble as it needs to be automatic and immediate. Here is how it's going to work. First off we have a personally made server script. At the moment I don't have the script file for me to post but I can add that later. 1. User purchases Mumble server from store with variables they select from drop down lists and input fields. [ex/ 30 slots; quality: 90kbps; clan acronym: NFC; superuser password: password5; your email: supercool55@gmail.com] 2. Purchase triggers server script and provides the script with the variables selected / inputed from the text boxes. 3. Server script copies the Mumble Server files to a folder and sets up the server as asked and randomly selects a port. 4. Email is sent to the customer, supercool55@gmail.com, giving them their selected options, their SU password, and the address to their mumble server. [ex/ 69.547.99.101:25565] I don't have the web store up yet as I haven't bought the domain yet, but I do have a test one up. The server exists already. The script is already made, the biggest issue to me is how to have Magento talk to the script on a specific item purchase AND provide the variables selected. I'll talk to my partner with this about his script and see if he can also include a new script that records the randomly selected port and credentials and has the server sends an email to the customer. If I'm not providing enough information for this, please tell me. Just in case - Drybones5@gmail.com
events
magento
triggers
script
purchase
null
open
Magento Purchase event trigger to access a script file and supplies inputed variables === I'm setting up an online store using Magento. One of the things purchasable will Mumble servers (ftp accounts and other web things will be done, but the main issue is mumble as it needs to be automatic and immediate. Here is how it's going to work. First off we have a personally made server script. At the moment I don't have the script file for me to post but I can add that later. 1. User purchases Mumble server from store with variables they select from drop down lists and input fields. [ex/ 30 slots; quality: 90kbps; clan acronym: NFC; superuser password: password5; your email: supercool55@gmail.com] 2. Purchase triggers server script and provides the script with the variables selected / inputed from the text boxes. 3. Server script copies the Mumble Server files to a folder and sets up the server as asked and randomly selects a port. 4. Email is sent to the customer, supercool55@gmail.com, giving them their selected options, their SU password, and the address to their mumble server. [ex/ 69.547.99.101:25565] I don't have the web store up yet as I haven't bought the domain yet, but I do have a test one up. The server exists already. The script is already made, the biggest issue to me is how to have Magento talk to the script on a specific item purchase AND provide the variables selected. I'll talk to my partner with this about his script and see if he can also include a new script that records the randomly selected port and credentials and has the server sends an email to the customer. If I'm not providing enough information for this, please tell me. Just in case - Drybones5@gmail.com
0
8,190,228
11/18/2011 23:04:18
295,290
03/17/2010 01:08:42
31
2
MySQL ALTER TABLE ADD COLUMN AFTER COLUMN - on a large table
Can this option take substantially longer than the same command without the AFTER COLUMN option? Does it use a different amount of (or any for that matter) tmp table space to perform the action? Context: I have a very large table (think over a billion rows) and I want to add an additional column using the AFTER COLUMN option, but I don't want to be penalized too much.
mysql
null
null
null
null
null
open
MySQL ALTER TABLE ADD COLUMN AFTER COLUMN - on a large table === Can this option take substantially longer than the same command without the AFTER COLUMN option? Does it use a different amount of (or any for that matter) tmp table space to perform the action? Context: I have a very large table (think over a billion rows) and I want to add an additional column using the AFTER COLUMN option, but I don't want to be penalized too much.
0
10,023,923
04/05/2012 06:55:22
1,042,822
11/12/2011 05:01:13
34
1
Take videos present inside the videos icon in iphone
I'm doing a project in which it should take the videos present inside the videos icon present in the iPhone. Can any one help me by giving a link or something in doing that. Any help is appreciated. Thanks
iphone
ios
iphone-sdk-4.0
ios5
ios4
null
open
Take videos present inside the videos icon in iphone === I'm doing a project in which it should take the videos present inside the videos icon present in the iPhone. Can any one help me by giving a link or something in doing that. Any help is appreciated. Thanks
0
6,014,799
05/16/2011 08:31:37
528,878
12/03/2010 03:54:02
39
1
How to show modal in cocos2d game application?
I want to know how to show modal view in cocos2d? Any one can help me? Thanks before. Regards. :)
cocos2d
modalviewcontroller
null
null
null
null
open
How to show modal in cocos2d game application? === I want to know how to show modal view in cocos2d? Any one can help me? Thanks before. Regards. :)
0
9,136,456
02/03/2012 22:36:26
434,218
08/29/2010 13:00:14
1,133
9
At least one text field not empty
It must be an afternoon caffeine deprivation... stuck on a seemingly simple logic. I have a form with many fields. I have 2 test fields. If both or at least one of them is not empty on POST I need to perform an action. This look quite convoluted, doesn't it? if (($_POST['filed1'] != '' && $_POST['filed2'] != '') || ($_POST['filed1'] != '' || $_POST['filed2'] != '')) { ... }
php
null
null
null
null
null
open
At least one text field not empty === It must be an afternoon caffeine deprivation... stuck on a seemingly simple logic. I have a form with many fields. I have 2 test fields. If both or at least one of them is not empty on POST I need to perform an action. This look quite convoluted, doesn't it? if (($_POST['filed1'] != '' && $_POST['filed2'] != '') || ($_POST['filed1'] != '' || $_POST['filed2'] != '')) { ... }
0
10,235,156
04/19/2012 19:14:46
1,188,803
02/04/2012 02:50:54
1
0
Facebook Request Dialog Hangs in Chrome or Safari
Facebook Request dialog hangs in chrome and safari, but works in Firefox. It only works for some users in Firefox though. I'm calling FB.init at the beginning of my app. So here is the code that I'm use to call the request dialog. Has anyone else had this problem? var _this = this; $("#fbSend").click(function() {return _this.sendRequestToRecipients($("#userId").val()); }); ({ sendRequestToRecipients: function(userId) { if (userId !== "User ID") { FB.ui({ method: 'apprequests', message: 'Check out my recommendation', data: 'hello', title: 'Check out this awesome app', to: userId }); } return false; } });
facebook
dialog
request
browser-compatibility
null
null
open
Facebook Request Dialog Hangs in Chrome or Safari === Facebook Request dialog hangs in chrome and safari, but works in Firefox. It only works for some users in Firefox though. I'm calling FB.init at the beginning of my app. So here is the code that I'm use to call the request dialog. Has anyone else had this problem? var _this = this; $("#fbSend").click(function() {return _this.sendRequestToRecipients($("#userId").val()); }); ({ sendRequestToRecipients: function(userId) { if (userId !== "User ID") { FB.ui({ method: 'apprequests', message: 'Check out my recommendation', data: 'hello', title: 'Check out this awesome app', to: userId }); } return false; } });
0
7,642,620
10/04/2011 02:10:04
802,050
06/16/2011 18:09:43
402
0
Advantages and Disadvantages of Detached object in hibernate?
i was looking at advantages and disadvantages of Detached object in hibernate and found the link http://www.careerride.com/Hibernate-advantages-disadvantages-of-detached-objects.aspx. Advantages:- Detached objects passing can be done across layers upto the presentation layer without using Data Transfer Objects. **Question 1:- If we use Persistent object instead of Detached object and take it to up to presentation layer, will we face some issue?** **Question 2:- what is the difference between Detached object and Detached Object?**
hibernate
null
null
null
null
null
open
Advantages and Disadvantages of Detached object in hibernate? === i was looking at advantages and disadvantages of Detached object in hibernate and found the link http://www.careerride.com/Hibernate-advantages-disadvantages-of-detached-objects.aspx. Advantages:- Detached objects passing can be done across layers upto the presentation layer without using Data Transfer Objects. **Question 1:- If we use Persistent object instead of Detached object and take it to up to presentation layer, will we face some issue?** **Question 2:- what is the difference between Detached object and Detached Object?**
0
10,920,841
06/06/2012 19:27:33
1,336,725
04/16/2012 15:56:17
10
1
Sony Xperia Mini Pro have a diferent behaves differently to the same apk
In my application I am creating a journal. In all devices behave correctly, however this device day are to be repeated, appears twice on the same day. The code is long to be exposed here. I understand the layout that can be different between devices, but as it is possible that the level of programming may differ between devices?
android
device
null
null
null
06/08/2012 08:32:44
not a real question
Sony Xperia Mini Pro have a diferent behaves differently to the same apk === In my application I am creating a journal. In all devices behave correctly, however this device day are to be repeated, appears twice on the same day. The code is long to be exposed here. I understand the layout that can be different between devices, but as it is possible that the level of programming may differ between devices?
1
2,479,458
03/19/2010 17:51:41
284,664
03/02/2010 18:41:05
6
0
User Dashboards Examples
Is there a place I can go and look at some UX templates for user dashboards? Show a customer's orders history, address, stuff like that?
user-experience
user
null
null
null
null
open
User Dashboards Examples === Is there a place I can go and look at some UX templates for user dashboards? Show a customer's orders history, address, stuff like that?
0
11,592,816
07/21/2012 13:58:13
1,381,951
05/08/2012 11:49:02
305
40
„Dependency Injection“ presupposes „Inversion of Control“
Is this really the case? Does dependency injection means that there is inversion of control in all cases?.
oop
dependency-injection
inversion-of-control
null
null
07/22/2012 21:52:50
not a real question
„Dependency Injection“ presupposes „Inversion of Control“ === Is this really the case? Does dependency injection means that there is inversion of control in all cases?.
1
10,540,397
05/10/2012 18:48:28
590,569
01/26/2011 12:22:44
230
9
Calculating timer start value for 8051 microcontroller
I'm using the example at http://www.keil.com/appnotes/files/apnt_105.pdf to figure out how to handle timer interrupt on Intel 8051 microcontroller. The document gives the following formula: 10000h - ((11,059,200 Hz / (12 * FREQ)) - 17) 10000h is the value at which the timer will overflow and trigger an interrupt. 11059200 Hz is the crystal frequency assumed in the example. It is divided by 12 because this is what 8051 internal oscillator does. FREQ is the desired frequency of timer tick. What I can't figure out is why 17 is subtracted from it. Is it the number of cycles the interrupt takes or something like that?
c
8051
keil
null
null
null
open
Calculating timer start value for 8051 microcontroller === I'm using the example at http://www.keil.com/appnotes/files/apnt_105.pdf to figure out how to handle timer interrupt on Intel 8051 microcontroller. The document gives the following formula: 10000h - ((11,059,200 Hz / (12 * FREQ)) - 17) 10000h is the value at which the timer will overflow and trigger an interrupt. 11059200 Hz is the crystal frequency assumed in the example. It is divided by 12 because this is what 8051 internal oscillator does. FREQ is the desired frequency of timer tick. What I can't figure out is why 17 is subtracted from it. Is it the number of cycles the interrupt takes or something like that?
0
5,489,760
03/30/2011 17:20:27
658,195
03/14/2011 03:42:07
46
2
Trigger a Javascript Alert from a Django backend event
I have a Django application that when submitting information, does some backend checks, and in a rare case that the checks fail, I need a Javascript Alert to be displayed. How do I trigger the JS event from the Django backend? I need this done from the backend - it can't be triggered by any html or 'onchange' event etc.
javascript
django
javascript-alert
null
null
null
open
Trigger a Javascript Alert from a Django backend event === I have a Django application that when submitting information, does some backend checks, and in a rare case that the checks fail, I need a Javascript Alert to be displayed. How do I trigger the JS event from the Django backend? I need this done from the backend - it can't be triggered by any html or 'onchange' event etc.
0
7,375,545
09/11/2011 00:26:58
881,362
08/05/2011 21:35:56
1
0
ipython complaining about readline
When I install ipython on my osx and run it, I get the following warning: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ site-packages/IPython/utils/rlineimpl.py:96: RuntimeWarning: Leopard libedit detected - readline will not be wel behaved including some crashes on tab completion, and incorrect history navigation. It is highly recommended that you install readline, which is easy_installable with: 'easy_install readline' I have have installed readline, and do not use the system python that was originally installed in `/Library/Frameworks/Python.framework/Versions/2.7/bin/python$`. The `/usr/bin/python` points to version 2.7 as shown below uname -a Darwin macbook.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 $sudo pip install readline ipython $ipython --version 0.11 $/usr/bin/python --version # Python 2.7.1 $which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python I have read the question in http://stackoverflow.com/questions/1017909/python-sys-path-modification-not-working - I added `/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline-6.2.1-py2.7.egg-info` to the `/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython` so that it now looks like this: http://pastebin.com/raw.php?i=dVnxufbS but I cannot figure out why I am getting the following error: File "/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython", line 9 sys.path.insert(0,"/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/readline-6.2.1-py2.7.egg-info") I do not think the above path is an issue, and my goal is to get ipython to working without complaining about readline even though it is installed and imports correctly.
python
null
null
null
null
null
open
ipython complaining about readline === When I install ipython on my osx and run it, I get the following warning: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ site-packages/IPython/utils/rlineimpl.py:96: RuntimeWarning: Leopard libedit detected - readline will not be wel behaved including some crashes on tab completion, and incorrect history navigation. It is highly recommended that you install readline, which is easy_installable with: 'easy_install readline' I have have installed readline, and do not use the system python that was originally installed in `/Library/Frameworks/Python.framework/Versions/2.7/bin/python$`. The `/usr/bin/python` points to version 2.7 as shown below uname -a Darwin macbook.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 $sudo pip install readline ipython $ipython --version 0.11 $/usr/bin/python --version # Python 2.7.1 $which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python I have read the question in http://stackoverflow.com/questions/1017909/python-sys-path-modification-not-working - I added `/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline-6.2.1-py2.7.egg-info` to the `/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython` so that it now looks like this: http://pastebin.com/raw.php?i=dVnxufbS but I cannot figure out why I am getting the following error: File "/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython", line 9 sys.path.insert(0,"/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/readline-6.2.1-py2.7.egg-info") I do not think the above path is an issue, and my goal is to get ipython to working without complaining about readline even though it is installed and imports correctly.
0
6,863,444
07/28/2011 17:54:32
823,640
04/19/2011 21:17:10
65
1
Find certificate by hash in Store C# using CryptAPI
I would like to get certificate from Store using CryptAPI P/Invoke. But I encountered some problems. I can open store, but not find certificate. I can not understande why. The same code works on C++. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; namespace capp { public class Crypto { #region CONSTS // #define CERT_COMPARE_SHIFT 16 public const Int32 CERT_COMPARE_SHIFT = 16; // #define CERT_STORE_PROV_SYSTEM_W ((LPCSTR) 10) public const Int32 CERT_STORE_PROV_SYSTEM_W = 10; // #define CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_W public const Int32 CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W; // #define CERT_SYSTEM_STORE_CURRENT_USER_ID 1 public const Int32 CERT_SYSTEM_STORE_CURRENT_USER_ID = 1; // #define CERT_SYSTEM_STORE_LOCATION_SHIFT 16 public const Int32 CERT_SYSTEM_STORE_LOCATION_SHIFT = 16; // #define CERT_SYSTEM_STORE_CURRENT_USER \ // (CERT_SYSTEM_STORE_CURRENT_USER_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT) public const Int32 CERT_SYSTEM_STORE_CURRENT_USER = CERT_SYSTEM_STORE_CURRENT_USER_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; // #define CERT_COMPARE_SHA1_HASH 1 public const Int32 CERT_COMPARE_SHA1_HASH = 1; // #define CERT_FIND_SHA1_HASH (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT) public const Int32 CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT); // #define X509_ASN_ENCODING 0x00000001 public const Int32 X509_ASN_ENCODING = 0x00000001; // #define PKCS_7_ASN_ENCODING 0x00010000 public const Int32 PKCS_7_ASN_ENCODING = 0x00010000; // #define MY_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING) public const Int32 MY_ENCODING_TYPE = PKCS_7_ASN_ENCODING | X509_ASN_ENCODING; #endregion #region STRUCTS // typedef struct _CRYPTOAPI_BLOB // { // DWORD cbData; // BYTE *pbData; // } CRYPT_HASH_BLOB, CRYPT_INTEGER_BLOB, // CRYPT_OBJID_BLOB, CERT_NAME_BLOB; [StructLayout(LayoutKind.Sequential)] public struct CRYPTOAPI_BLOB { public Int32 cbData; public Byte[] pbData; } #endregion #region FUNCTIONS (IMPORTS) // HCERTSTORE WINAPI CertOpenStore( // LPCSTR lpszStoreProvider, // DWORD dwMsgAndCertEncodingType, // HCRYPTPROV hCryptProv, // DWORD dwFlags, // const void* pvPara // ); [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr CertOpenStore( Int32 lpszStoreProvider, Int32 dwMsgAndCertEncodingType, IntPtr hCryptProv, Int32 dwFlags, String pvPara ); // BOOL WINAPI CertCloseStore( // HCERTSTORE hCertStore, // DWORD dwFlags // ); [DllImport("Crypt32.dll", SetLastError = true)] public static extern Boolean CertCloseStore( IntPtr hCertStore, Int32 dwFlags ); // PCCERT_CONTEXT WINAPI CertFindCertificateInStore( // HCERTSTORE hCertStore, // DWORD dwCertEncodingType, // DWORD dwFindFlags, // DWORD dwFindType, // const void* pvFindPara, // PCCERT_CONTEXT pPrevCertContext // ); [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr CertFindCertificateInStore( IntPtr hCertStore, Int32 dwCertEncodingType, Int32 dwFindFlags, Int32 dwFindType, //String pvFindPara, ref CRYPTOAPI_BLOB pvFindPara, IntPtr pPrevCertContext ); // BOOL WINAPI CertFreeCertificateContext( // PCCERT_CONTEXT pCertContext // ); [DllImport("Crypt32.dll", SetLastError = true)] public static extern Boolean CertFreeCertificateContext( IntPtr pCertContext ); #endregion } class Program { const string MY = "MY"; static void Main(string[] args) { IntPtr hCertCntxt = IntPtr.Zero; IntPtr hStore = IntPtr.Zero; hStore = Crypto.CertOpenStore(Crypto.CERT_STORE_PROV_SYSTEM, Crypto.MY_ENCODING_TYPE, IntPtr.Zero, Crypto.CERT_SYSTEM_STORE_CURRENT_USER, MY); Console.WriteLine("Store Handle:\t0x{0:X}", hStore.ToInt32()); String sha1Hex = "7a0b021806bffdb826205dac094030f8045d4daa"; // Convert to bin int tam = sha1Hex.Length / 2; byte[] sha1Bin = new byte[tam]; int aux = 0; for (int i = 0; i < tam; ++i) { String str = sha1Hex.Substring(aux, 2); sha1Bin[i] = (byte)Convert.ToInt32(str, 16); aux = aux + 2; } Crypto.CRYPTOAPI_BLOB cryptBlob; cryptBlob.cbData = sha1Bin.Length; cryptBlob.pbData = sha1Bin; if (hStore != IntPtr.Zero) { Console.WriteLine("Inside Store"); hCertCntxt = Crypto.CertFindCertificateInStore( hStore, Crypto.MY_ENCODING_TYPE, 0, Crypto.CERT_FIND_SHA1_HASH, ref cryptBlob, IntPtr.Zero); if (hCertCntxt != IntPtr.Zero) Console.WriteLine("Certificate found!"); else Console.WriteLine("Could not find "); } if (hCertCntxt != IntPtr.Zero) Crypto.CertFreeCertificateContext(hCertCntxt); if (hStore != IntPtr.Zero) Crypto.CertCloseStore(hStore, 0); } } } Thanks in Advance Reference link to map CrytpAPI to C# http://blogs.msdn.com/b/alejacma/archive/2007/11/23/p-invoking-cryptoapi-in-net-c-version.aspx
c#
.net
cryptography
certificate
null
null
open
Find certificate by hash in Store C# using CryptAPI === I would like to get certificate from Store using CryptAPI P/Invoke. But I encountered some problems. I can open store, but not find certificate. I can not understande why. The same code works on C++. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; namespace capp { public class Crypto { #region CONSTS // #define CERT_COMPARE_SHIFT 16 public const Int32 CERT_COMPARE_SHIFT = 16; // #define CERT_STORE_PROV_SYSTEM_W ((LPCSTR) 10) public const Int32 CERT_STORE_PROV_SYSTEM_W = 10; // #define CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_W public const Int32 CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W; // #define CERT_SYSTEM_STORE_CURRENT_USER_ID 1 public const Int32 CERT_SYSTEM_STORE_CURRENT_USER_ID = 1; // #define CERT_SYSTEM_STORE_LOCATION_SHIFT 16 public const Int32 CERT_SYSTEM_STORE_LOCATION_SHIFT = 16; // #define CERT_SYSTEM_STORE_CURRENT_USER \ // (CERT_SYSTEM_STORE_CURRENT_USER_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT) public const Int32 CERT_SYSTEM_STORE_CURRENT_USER = CERT_SYSTEM_STORE_CURRENT_USER_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; // #define CERT_COMPARE_SHA1_HASH 1 public const Int32 CERT_COMPARE_SHA1_HASH = 1; // #define CERT_FIND_SHA1_HASH (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT) public const Int32 CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT); // #define X509_ASN_ENCODING 0x00000001 public const Int32 X509_ASN_ENCODING = 0x00000001; // #define PKCS_7_ASN_ENCODING 0x00010000 public const Int32 PKCS_7_ASN_ENCODING = 0x00010000; // #define MY_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING) public const Int32 MY_ENCODING_TYPE = PKCS_7_ASN_ENCODING | X509_ASN_ENCODING; #endregion #region STRUCTS // typedef struct _CRYPTOAPI_BLOB // { // DWORD cbData; // BYTE *pbData; // } CRYPT_HASH_BLOB, CRYPT_INTEGER_BLOB, // CRYPT_OBJID_BLOB, CERT_NAME_BLOB; [StructLayout(LayoutKind.Sequential)] public struct CRYPTOAPI_BLOB { public Int32 cbData; public Byte[] pbData; } #endregion #region FUNCTIONS (IMPORTS) // HCERTSTORE WINAPI CertOpenStore( // LPCSTR lpszStoreProvider, // DWORD dwMsgAndCertEncodingType, // HCRYPTPROV hCryptProv, // DWORD dwFlags, // const void* pvPara // ); [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr CertOpenStore( Int32 lpszStoreProvider, Int32 dwMsgAndCertEncodingType, IntPtr hCryptProv, Int32 dwFlags, String pvPara ); // BOOL WINAPI CertCloseStore( // HCERTSTORE hCertStore, // DWORD dwFlags // ); [DllImport("Crypt32.dll", SetLastError = true)] public static extern Boolean CertCloseStore( IntPtr hCertStore, Int32 dwFlags ); // PCCERT_CONTEXT WINAPI CertFindCertificateInStore( // HCERTSTORE hCertStore, // DWORD dwCertEncodingType, // DWORD dwFindFlags, // DWORD dwFindType, // const void* pvFindPara, // PCCERT_CONTEXT pPrevCertContext // ); [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr CertFindCertificateInStore( IntPtr hCertStore, Int32 dwCertEncodingType, Int32 dwFindFlags, Int32 dwFindType, //String pvFindPara, ref CRYPTOAPI_BLOB pvFindPara, IntPtr pPrevCertContext ); // BOOL WINAPI CertFreeCertificateContext( // PCCERT_CONTEXT pCertContext // ); [DllImport("Crypt32.dll", SetLastError = true)] public static extern Boolean CertFreeCertificateContext( IntPtr pCertContext ); #endregion } class Program { const string MY = "MY"; static void Main(string[] args) { IntPtr hCertCntxt = IntPtr.Zero; IntPtr hStore = IntPtr.Zero; hStore = Crypto.CertOpenStore(Crypto.CERT_STORE_PROV_SYSTEM, Crypto.MY_ENCODING_TYPE, IntPtr.Zero, Crypto.CERT_SYSTEM_STORE_CURRENT_USER, MY); Console.WriteLine("Store Handle:\t0x{0:X}", hStore.ToInt32()); String sha1Hex = "7a0b021806bffdb826205dac094030f8045d4daa"; // Convert to bin int tam = sha1Hex.Length / 2; byte[] sha1Bin = new byte[tam]; int aux = 0; for (int i = 0; i < tam; ++i) { String str = sha1Hex.Substring(aux, 2); sha1Bin[i] = (byte)Convert.ToInt32(str, 16); aux = aux + 2; } Crypto.CRYPTOAPI_BLOB cryptBlob; cryptBlob.cbData = sha1Bin.Length; cryptBlob.pbData = sha1Bin; if (hStore != IntPtr.Zero) { Console.WriteLine("Inside Store"); hCertCntxt = Crypto.CertFindCertificateInStore( hStore, Crypto.MY_ENCODING_TYPE, 0, Crypto.CERT_FIND_SHA1_HASH, ref cryptBlob, IntPtr.Zero); if (hCertCntxt != IntPtr.Zero) Console.WriteLine("Certificate found!"); else Console.WriteLine("Could not find "); } if (hCertCntxt != IntPtr.Zero) Crypto.CertFreeCertificateContext(hCertCntxt); if (hStore != IntPtr.Zero) Crypto.CertCloseStore(hStore, 0); } } } Thanks in Advance Reference link to map CrytpAPI to C# http://blogs.msdn.com/b/alejacma/archive/2007/11/23/p-invoking-cryptoapi-in-net-c-version.aspx
0
10,393,391
05/01/2012 04:04:40
1,360,437
04/27/2012 06:43:49
20
1
Warning when I revert from desktop session. Emacs
Yesterday I found desktop mode from EmacsWiki, and then I configure it for my Emacs 24: ;; Desktop (require 'desktop) ;; save the desktop file automatically if it already exists (desktop-save-mode 1) ;; use only one desktop (setq desktop-path '("~/.emacs.d/tmp/")) (setq desktop-dirname "~/.emacs.d/tmp/") (setq desktop-base-file-name "desktop.cache") But I got a warning in *\*Compile-Log\** buffer when I restart Emacs: Warning: ad-Orig-kill-region called with 3 arguments, but accepts only 2 Anyone else encounter this warning when use desktop? Or, any add-ons else better than desktop-mode?
emacs
null
null
null
null
null
open
Warning when I revert from desktop session. Emacs === Yesterday I found desktop mode from EmacsWiki, and then I configure it for my Emacs 24: ;; Desktop (require 'desktop) ;; save the desktop file automatically if it already exists (desktop-save-mode 1) ;; use only one desktop (setq desktop-path '("~/.emacs.d/tmp/")) (setq desktop-dirname "~/.emacs.d/tmp/") (setq desktop-base-file-name "desktop.cache") But I got a warning in *\*Compile-Log\** buffer when I restart Emacs: Warning: ad-Orig-kill-region called with 3 arguments, but accepts only 2 Anyone else encounter this warning when use desktop? Or, any add-ons else better than desktop-mode?
0
7,161,688
08/23/2011 13:22:52
907,780
08/23/2011 13:22:52
1
0
Setting up home Wi-Fi network
I am trying to set up home Wi-Fi network and I am facing some issues you probably could help me solve. Explanation of problem might sound little weird, I actually have very little knowledge of networking, so please excuse that. Ok, my Internet connection provider gave me Motorola modem which connects to cable television site. And the modem exposes one LAN port. Important thing to note is also fact, that modem saves MAC address of first device which connects after it's start up, and won't work when I change that device without restarting the modem. It's just fixed to that MAC address. And now what I am trying to do. I have two different ASUS laptops with Wi-Fi and Airlive WL-5460AP v2 router. What I did was connect the router into modem and I need to figure how to set up this router to act like Wi-Fi Access Point, so my two laptops could connect to it simultaneously and both be online. I set it up as AP + Bridge but when first laptop connects, second one is allowed to connect to wi-fi site but internet works only on first connected laptop. Also, when I connect one laptop by wifi and another one by routers LAN port, only on device can have internet too. Any ideas how to make it working so both of computer could have Internet at same time? Thanks really, really lot! Aaron
networking
wifi
router
modem
null
08/23/2011 13:25:20
off topic
Setting up home Wi-Fi network === I am trying to set up home Wi-Fi network and I am facing some issues you probably could help me solve. Explanation of problem might sound little weird, I actually have very little knowledge of networking, so please excuse that. Ok, my Internet connection provider gave me Motorola modem which connects to cable television site. And the modem exposes one LAN port. Important thing to note is also fact, that modem saves MAC address of first device which connects after it's start up, and won't work when I change that device without restarting the modem. It's just fixed to that MAC address. And now what I am trying to do. I have two different ASUS laptops with Wi-Fi and Airlive WL-5460AP v2 router. What I did was connect the router into modem and I need to figure how to set up this router to act like Wi-Fi Access Point, so my two laptops could connect to it simultaneously and both be online. I set it up as AP + Bridge but when first laptop connects, second one is allowed to connect to wi-fi site but internet works only on first connected laptop. Also, when I connect one laptop by wifi and another one by routers LAN port, only on device can have internet too. Any ideas how to make it working so both of computer could have Internet at same time? Thanks really, really lot! Aaron
2
11,098,095
06/19/2012 09:24:44
1,306,464
04/01/2012 15:27:42
21
5
get url parameter in cakephp
Kinda having a problem here since I am not getting the search results in google correctly. What I want to do is to simply extract this confirmation code in this url: http://localhost/myproject/webactivate/activate/4fe114bf590c410597b20ef8ac1000751340150975vU0t70lN I would like to get this 4fe114bf590c410597b20ef8ac1000751340150975vU0t70lN It must be something simple..
url
cakephp
null
null
null
null
open
get url parameter in cakephp === Kinda having a problem here since I am not getting the search results in google correctly. What I want to do is to simply extract this confirmation code in this url: http://localhost/myproject/webactivate/activate/4fe114bf590c410597b20ef8ac1000751340150975vU0t70lN I would like to get this 4fe114bf590c410597b20ef8ac1000751340150975vU0t70lN It must be something simple..
0
5,407,068
03/23/2011 14:50:26
363,354
06/10/2010 10:51:36
1
1
How can you easily request the gmaps4rails gem to geocode an address on update?
there is a great gem for Rails 3 and Google Maps v3 integration (gmaps4rails) - I'm not a good Rails dev. but it worked within 15 minutes for me!! I have one question though, I've been trying to get the geocoder to fire on every save/update/edit view to make sure the pin/map is always up-to-date (the records will not be edited very often so I can let the efficiency downside of this slide) but I am unable to get "check_process" to work as an argument. has anyone had any experience with this one? if so, thanks for sharing.
ruby-on-rails-3
google-maps
google-maps-api-3
gmaps
gmaps4rails
null
open
How can you easily request the gmaps4rails gem to geocode an address on update? === there is a great gem for Rails 3 and Google Maps v3 integration (gmaps4rails) - I'm not a good Rails dev. but it worked within 15 minutes for me!! I have one question though, I've been trying to get the geocoder to fire on every save/update/edit view to make sure the pin/map is always up-to-date (the records will not be edited very often so I can let the efficiency downside of this slide) but I am unable to get "check_process" to work as an argument. has anyone had any experience with this one? if so, thanks for sharing.
0
9,852,650
03/24/2012 14:50:43
1,218,730
02/19/2012 03:04:50
1
0
Merkle-Hellman knapsack Decryption
Suppose that plaintext message units are digraphs in the ordinary 26-letter alphabet, where (as usual) A-Z corresponds to 0-25. We represent each digraph ij as an integer in the following way: (26 · i) + j: For example, the digraph \IN" is represented as 26 · 8 + 13 = 221: You receive the sequence of ciphertext message units, 5809; 7565; 7730; 3226; 10096; 6484; 8364; 9043; 9552; 5072 which were encrypted using a Merkle-Hellman knapsack system. (Each unit is the encryption of a digraph, and hence represents two plaintext letters.) The private key for the system is (M = 2617;W = 1036; {3; 5; 10; 19; 41; 79; 161; 320; 641; 1311}): Your job is to decipher the message.
encryption
knapsack
null
null
null
03/26/2012 15:49:38
not a real question
Merkle-Hellman knapsack Decryption === Suppose that plaintext message units are digraphs in the ordinary 26-letter alphabet, where (as usual) A-Z corresponds to 0-25. We represent each digraph ij as an integer in the following way: (26 · i) + j: For example, the digraph \IN" is represented as 26 · 8 + 13 = 221: You receive the sequence of ciphertext message units, 5809; 7565; 7730; 3226; 10096; 6484; 8364; 9043; 9552; 5072 which were encrypted using a Merkle-Hellman knapsack system. (Each unit is the encryption of a digraph, and hence represents two plaintext letters.) The private key for the system is (M = 2617;W = 1036; {3; 5; 10; 19; 41; 79; 161; 320; 641; 1311}): Your job is to decipher the message.
1
8,920,077
01/19/2012 01:47:04
515,578
11/22/2010 03:18:42
114
10
Inserting output into page after document has been executed
In PHP have a situation where I need the page to be mostly executed, but have an item inserted into the output from that page. I think output buffering may be of some help, but I can't work out how to implement it in my situation. My code looks like this: //this document is part of a global functions file function pageHeader (){ //I'm using $GLOBALS here because it works, however I would really rather a better method if possible $GLOBALS['error_handler'] = new ErrorHandler(); //ErrorHandler class sets a function for set_error_handler, which gets an array of errors from the executed page require_once($_SERVER['DOCUMENT_ROOT'].'/sales/global/_header.php'); //I would like the unordered list from ->displayErrorNotice() to be displayed here, but if I do that the list is empty because the list was output before the rest of the document was executed } function pageFooter (){ $GLOBALS['error_handler'] ->displayErrorNotice(); //this function displays the errors as an html unordered list include($_SERVER['DOCUMENT_ROOT']."/sales/global/_footer.php"); } Most pages on the site include this document and use the `pageHeader()` and `pageFooter()` functions. What I am trying to achieve is to put an unordered list of the PHP generated errors into an HTML list just at a point after _header.php has been included. I can get the list to work as intended if I put it in the footer (after the document has been executed), but I don't want it there. I guess I could move it with JS, but I think there must be a PHP solution.
php
output
buffering
globals
null
null
open
Inserting output into page after document has been executed === In PHP have a situation where I need the page to be mostly executed, but have an item inserted into the output from that page. I think output buffering may be of some help, but I can't work out how to implement it in my situation. My code looks like this: //this document is part of a global functions file function pageHeader (){ //I'm using $GLOBALS here because it works, however I would really rather a better method if possible $GLOBALS['error_handler'] = new ErrorHandler(); //ErrorHandler class sets a function for set_error_handler, which gets an array of errors from the executed page require_once($_SERVER['DOCUMENT_ROOT'].'/sales/global/_header.php'); //I would like the unordered list from ->displayErrorNotice() to be displayed here, but if I do that the list is empty because the list was output before the rest of the document was executed } function pageFooter (){ $GLOBALS['error_handler'] ->displayErrorNotice(); //this function displays the errors as an html unordered list include($_SERVER['DOCUMENT_ROOT']."/sales/global/_footer.php"); } Most pages on the site include this document and use the `pageHeader()` and `pageFooter()` functions. What I am trying to achieve is to put an unordered list of the PHP generated errors into an HTML list just at a point after _header.php has been included. I can get the list to work as intended if I put it in the footer (after the document has been executed), but I don't want it there. I guess I could move it with JS, but I think there must be a PHP solution.
0
2,776,866
05/05/2010 21:19:29
333,882
05/05/2010 21:19:29
1
0
Drag and Drop and identify locations with java
I'm trying to do something quite simple, but I'm having a hard time finding good examples on the net to what I want specifically. I'd like to somehing very similer to what it's here: [Dao][1] [1]: http://www.nawwal.org/jrgoff/dao/playGame.html It's a simple game called DAO and I just need to have a background image with 16 squares (4x4) and drag and drop the images (pieces) on each square to the others. I'm developing the interface using swing and I simply want to know a good place to find tutorials for such implementations or a simple suggestion on how to do it. Thanks in advance
java
null
null
null
null
null
open
Drag and Drop and identify locations with java === I'm trying to do something quite simple, but I'm having a hard time finding good examples on the net to what I want specifically. I'd like to somehing very similer to what it's here: [Dao][1] [1]: http://www.nawwal.org/jrgoff/dao/playGame.html It's a simple game called DAO and I just need to have a background image with 16 squares (4x4) and drag and drop the images (pieces) on each square to the others. I'm developing the interface using swing and I simply want to know a good place to find tutorials for such implementations or a simple suggestion on how to do it. Thanks in advance
0
4,605,649
01/05/2011 15:16:13
217,187
11/23/2009 17:25:04
39
7
iPhone/iPad Spinner to keep animation
I am new to core-animationI am basing this on a previous post: http://stackoverflow.com/questions/1547171/spin-image-clockwise-anticlockwise-on-touch Probably a basic question, but I just want the circle to spin a certain distance and then stop. When the animation ends, it reverts back to the original location. How do I keep the item to stay where it's at when the animation ends? ------------------------------------- What I really want is free floating wheel that responds to user swiping. When the user swipes to the left on the wheel, the wheel spins to the left. Depending on the speed of the swipe, the wheel spins faster and then starts to slow down. If anyone can give some hints or directions on this, I would be greatly appreciative. ![alt text][1] [1]: http://i.stack.imgur.com/YQvJF.png
iphone
ipad
ios
core-animation
null
null
open
iPhone/iPad Spinner to keep animation === I am new to core-animationI am basing this on a previous post: http://stackoverflow.com/questions/1547171/spin-image-clockwise-anticlockwise-on-touch Probably a basic question, but I just want the circle to spin a certain distance and then stop. When the animation ends, it reverts back to the original location. How do I keep the item to stay where it's at when the animation ends? ------------------------------------- What I really want is free floating wheel that responds to user swiping. When the user swipes to the left on the wheel, the wheel spins to the left. Depending on the speed of the swipe, the wheel spins faster and then starts to slow down. If anyone can give some hints or directions on this, I would be greatly appreciative. ![alt text][1] [1]: http://i.stack.imgur.com/YQvJF.png
0
4,034,840
10/27/2010 15:19:42
489,021
10/27/2010 15:19:42
1
0
MLE for Naive Bayes in R
i am using naivebayes function of e1071 library of R like below: model <- naiveBayes(Species ~ ., data = iris) pred <- predict(model, iris[,]) my question is: how can i get maximum likelihood estimate for conditional probability distibution of this model?
r
statistics
machine-learning
null
null
10/28/2010 20:43:25
off topic
MLE for Naive Bayes in R === i am using naivebayes function of e1071 library of R like below: model <- naiveBayes(Species ~ ., data = iris) pred <- predict(model, iris[,]) my question is: how can i get maximum likelihood estimate for conditional probability distibution of this model?
2
4,918,295
02/07/2011 05:23:49
604,620
02/05/2011 18:37:33
3
0
Assembly Question
Where can I write and compile assembly code ? (I am using windows vista 64 bit). Also is there a Dissasembler I can use? Regards
assembly
null
null
null
null
02/07/2011 11:04:51
not a real question
Assembly Question === Where can I write and compile assembly code ? (I am using windows vista 64 bit). Also is there a Dissasembler I can use? Regards
1
4,005,818
10/23/2010 20:03:32
187,206
10/09/2009 13:57:31
1,325
37
Where is Short.toString(short s, int radix)?
`Short.parseShort(String s, int radix)` exists, as does `Integer.parseInt(String s, int radix)` and `Long.parseLong(String s, int radix)`. `Integer.toString(int i, int radix)` and `Long.toString(long l, int radix)` exist. `Short.toString(short s)`, `Integer.toString(int i)` and `Long.toString(long l)` all exist. So why is there no `Short.toString(short s, int radix)`? (It can't be because you can always cast your short to an int and use the `Integer` class' method, the same argument could be made for getting rid that; you could always cast your int to a long and use the `Long` class' version.)
java
null
null
null
null
null
open
Where is Short.toString(short s, int radix)? === `Short.parseShort(String s, int radix)` exists, as does `Integer.parseInt(String s, int radix)` and `Long.parseLong(String s, int radix)`. `Integer.toString(int i, int radix)` and `Long.toString(long l, int radix)` exist. `Short.toString(short s)`, `Integer.toString(int i)` and `Long.toString(long l)` all exist. So why is there no `Short.toString(short s, int radix)`? (It can't be because you can always cast your short to an int and use the `Integer` class' method, the same argument could be made for getting rid that; you could always cast your int to a long and use the `Long` class' version.)
0
3,053,123
06/16/2010 12:17:50
52,420
01/07/2009 13:07:08
631
9
how can i write line by line in txt data?
<p>i try to write line by line data but. if i run my application. writng last text1 data in script.txt </p> <pre><code> private void button1_Click(object sender, EventArgs e) { System.IO.TextWriter tw; tw = new StreamWriter("C:/Script.txt"); tw.WriteLine(textBox1.Text); tw.Close(); }</code></code>
c#
.net
visual-studio
file
null
06/17/2010 23:41:08
not a real question
how can i write line by line in txt data? === <p>i try to write line by line data but. if i run my application. writng last text1 data in script.txt </p> <pre><code> private void button1_Click(object sender, EventArgs e) { System.IO.TextWriter tw; tw = new StreamWriter("C:/Script.txt"); tw.WriteLine(textBox1.Text); tw.Close(); }</code></code>
1
1,000,956
06/16/2009 11:41:25
118,437
06/06/2009 06:17:38
433
11
Javascript major mode in Emacs ?
Which javascript major modes exist in Emacs, and what are their key-features ?
javascript
emacs
emacs-major-mode
null
null
null
open
Javascript major mode in Emacs ? === Which javascript major modes exist in Emacs, and what are their key-features ?
0
10,276,367
04/23/2012 07:20:47
798,438
06/14/2011 20:16:48
85
3
How this jQuery return?
function teste(){ var test = $('#teste').val(); if(!test){ alert('no.'); }else{ if(confirm('confirm: ' + test)){ /*$.post("", {teste:test}, function(data){ $("#result").html(data); } );*/ ajax('dir/page','result','','variable='+test); //location.href = ""; } } } My question is... How this jQuery return? ajax('dir/page','result','','variable='+test); I know mount this: www.site.com/dir/page with "dir/page" but, how I add 'result' and 'variable=test in this case?
javascript
jquery
ajax
null
null
04/23/2012 21:11:38
not a real question
How this jQuery return? === function teste(){ var test = $('#teste').val(); if(!test){ alert('no.'); }else{ if(confirm('confirm: ' + test)){ /*$.post("", {teste:test}, function(data){ $("#result").html(data); } );*/ ajax('dir/page','result','','variable='+test); //location.href = ""; } } } My question is... How this jQuery return? ajax('dir/page','result','','variable='+test); I know mount this: www.site.com/dir/page with "dir/page" but, how I add 'result' and 'variable=test in this case?
1
4,231,526
11/20/2010 06:37:49
508,236
11/15/2010 12:31:04
7
1
jquery $.ajax() in safari and chrome doesn't work
I want use $.ajax to read some infomation from xml file,here is my js code : $.ajax({ type: "get", url: "Database/App_all.xml", dataType: "xml", timeout: 2000, beforeSend: function () { }, success: function (xml) { $(xml).find("app[id='id-1']").appendTo($("#contain")); }, error: function () { alert("ajax failed!"); } }); However, the code only work great in firefox and opera. It doesn't work in chrome(7.0.517.24 ) and safari(5.0.1),failed without any alert,not even the alert("ajax failed"). Is there any bug in $.ajax in chrome and safari?so how to solve the problem? thank you very much:)
jquery
ajax
google-chrome
jquery-ajax
safari
null
open
jquery $.ajax() in safari and chrome doesn't work === I want use $.ajax to read some infomation from xml file,here is my js code : $.ajax({ type: "get", url: "Database/App_all.xml", dataType: "xml", timeout: 2000, beforeSend: function () { }, success: function (xml) { $(xml).find("app[id='id-1']").appendTo($("#contain")); }, error: function () { alert("ajax failed!"); } }); However, the code only work great in firefox and opera. It doesn't work in chrome(7.0.517.24 ) and safari(5.0.1),failed without any alert,not even the alert("ajax failed"). Is there any bug in $.ajax in chrome and safari?so how to solve the problem? thank you very much:)
0
11,117,968
06/20/2012 10:50:45
1,464,139
06/18/2012 15:44:14
20
0
Is there a way I can clean up this javascript?
I am trying to understand javascript and the switch. I have the following code: switch (action) { case "Edit": if (rownum != "") { var dialogTitle = $form.find("#Title").val(); var dialogType = $form.find("#Type :selected").text(); $row.find("#Title_" + rownum).html(dialogTitle); $row.find("#Type_" + rownum).html(dialogType); } if (close == true) { modal.closeModal() } else { submitBt.enableBt(); $('#modal').removeBlockMessages() } break; case "Create": if (close == true) { modal.closeModal() } else { submitBt.enableBt(); $('#modal').removeBlockMessages() } break; case "Delete": $row.remove(); modal.closeModal() break; default: // window.location = json.redirect || location.href; window.location.reload(); } Is it possible for me to clean up this code any more? I was thinking aobut the part that closes the Modal. Could I move this outside of the switch?
javascript
null
null
null
null
06/20/2012 10:56:32
too localized
Is there a way I can clean up this javascript? === I am trying to understand javascript and the switch. I have the following code: switch (action) { case "Edit": if (rownum != "") { var dialogTitle = $form.find("#Title").val(); var dialogType = $form.find("#Type :selected").text(); $row.find("#Title_" + rownum).html(dialogTitle); $row.find("#Type_" + rownum).html(dialogType); } if (close == true) { modal.closeModal() } else { submitBt.enableBt(); $('#modal').removeBlockMessages() } break; case "Create": if (close == true) { modal.closeModal() } else { submitBt.enableBt(); $('#modal').removeBlockMessages() } break; case "Delete": $row.remove(); modal.closeModal() break; default: // window.location = json.redirect || location.href; window.location.reload(); } Is it possible for me to clean up this code any more? I was thinking aobut the part that closes the Modal. Could I move this outside of the switch?
3
11,406,754
07/10/2012 04:44:03
1,506,533
07/06/2012 11:05:10
3
0
How to make event for specific date?
Where event detail should store?How to make alarm for specific event that i don't know.Please help with code or give link for that type of example. Thank in Advance.
iphone
null
null
null
null
07/10/2012 06:23:51
not a real question
How to make event for specific date? === Where event detail should store?How to make alarm for specific event that i don't know.Please help with code or give link for that type of example. Thank in Advance.
1
5,880,046
05/04/2011 07:32:15
586,482
12/08/2010 11:39:23
31
5
Saving Bundle ?
Which one is better to save Bundle: OnSaveInstanceState or OnPause in order to save Bundle in case or rotation and redrawing of a Gridview containing images that have been modified ?
android
gridview
bundle
saving
onpause
null
open
Saving Bundle ? === Which one is better to save Bundle: OnSaveInstanceState or OnPause in order to save Bundle in case or rotation and redrawing of a Gridview containing images that have been modified ?
0
8,955,385
01/21/2012 18:14:47
295,189
03/16/2010 21:44:33
1,429
15
How to have a billing user in amazon
I have a need to give billing access of amazon to my client. Is there a way to setup an account that will have access to Account Activity only. I know I can setup IAM for aws but thats not the issue is here. I definitely need one password separate password for billing which is Account Activity link. thanks
amazon-ec2
amazon-web-services
amazon
null
null
01/23/2012 18:50:41
off topic
How to have a billing user in amazon === I have a need to give billing access of amazon to my client. Is there a way to setup an account that will have access to Account Activity only. I know I can setup IAM for aws but thats not the issue is here. I definitely need one password separate password for billing which is Account Activity link. thanks
2
9,118,476
02/02/2012 19:14:53
256,007
01/21/2010 17:10:22
1,411
85
High Traffic CGI Application Development
If I use Compiled `CGI` instead of using a interpreted language like `PHP`, `Python` etc .. in High Traffic Scenario am I going to run into some problem ? assuming I'll not have any development related problem as I am more familiar with the compiled languages. should a CGI Application be built with a Embedded server ? like `Wt`, `Pion`, `Mongoose` etc .. or just make develop the app and put the CGI binary in Document root of standard Apache Installation ? which one is better choice ? can `Pion`, `Wt`, or any other `Embedded Web Server` handle High Traffic ? or I seriously need to switch to Apachhe HTTPD (`embedded ?`). You may say switching to Apache HTTPD is a better choice But why not `boost.asio` stuffs ? If I plan for High Traffic and I decide to run the app under standard Apache Installation as CGI binary should I do the same while developing it ? Is it really better to use an embedded server while developing and move to real server while deploying.
c++
apache
boost
cgi
boost-asio
02/03/2012 08:46:27
not constructive
High Traffic CGI Application Development === If I use Compiled `CGI` instead of using a interpreted language like `PHP`, `Python` etc .. in High Traffic Scenario am I going to run into some problem ? assuming I'll not have any development related problem as I am more familiar with the compiled languages. should a CGI Application be built with a Embedded server ? like `Wt`, `Pion`, `Mongoose` etc .. or just make develop the app and put the CGI binary in Document root of standard Apache Installation ? which one is better choice ? can `Pion`, `Wt`, or any other `Embedded Web Server` handle High Traffic ? or I seriously need to switch to Apachhe HTTPD (`embedded ?`). You may say switching to Apache HTTPD is a better choice But why not `boost.asio` stuffs ? If I plan for High Traffic and I decide to run the app under standard Apache Installation as CGI binary should I do the same while developing it ? Is it really better to use an embedded server while developing and move to real server while deploying.
4
500,748
02/01/2009 13:00:48
51,078
01/03/2009 02:00:48
160
14
What is static_case operator in C++?
I've heard of <a href="http://msdn.microsoft.com/en-us/library/c36yw7x9(VS.80).aspx">**static_cast operator**</a> Recently I've come across **static_case**, for instance: *ppv = static_case<IUnknown> What does this mean?
c++
null
null
null
null
02/02/2009 20:30:13
off topic
What is static_case operator in C++? === I've heard of <a href="http://msdn.microsoft.com/en-us/library/c36yw7x9(VS.80).aspx">**static_cast operator**</a> Recently I've come across **static_case**, for instance: *ppv = static_case<IUnknown> What does this mean?
2
5,589,709
04/08/2011 02:16:34
697,877
04/08/2011 02:16:34
1
0
Copied javascript code gets word wrapped when pasted into EditPlus, but wordwrap is off
I went to this site. http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm There is a box that says select all, I copy the code that is nice and orderly and easy to read. When I paste it, the whole thing is wordwrapped. The code works as is but when I modify fields I get errors because I must be moving lines that should not be moved. I even tried in Notepad and its all one. Please try the copy and paste and see if it does the same for you. If it shows up like the window it was copied from please let me know what the problem is.
javascript
null
null
null
null
04/08/2011 05:45:05
too localized
Copied javascript code gets word wrapped when pasted into EditPlus, but wordwrap is off === I went to this site. http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm There is a box that says select all, I copy the code that is nice and orderly and easy to read. When I paste it, the whole thing is wordwrapped. The code works as is but when I modify fields I get errors because I must be moving lines that should not be moved. I even tried in Notepad and its all one. Please try the copy and paste and see if it does the same for you. If it shows up like the window it was copied from please let me know what the problem is.
3
7,610,259
09/30/2011 12:19:49
973,045
09/30/2011 12:07:42
1
0
Cant connect Aptana Studio via FTP to HostEurope
I try to connect via FTP/SFTP with my Provider HostEurope. But everything fails. Standard FTP programs are all OK. What am I doin wrong? Thx Bernie
ftp
sftp
null
null
null
09/30/2011 13:53:29
not a real question
Cant connect Aptana Studio via FTP to HostEurope === I try to connect via FTP/SFTP with my Provider HostEurope. But everything fails. Standard FTP programs are all OK. What am I doin wrong? Thx Bernie
1
7,253,247
08/31/2011 06:17:30
591,656
01/27/2011 04:04:03
3,612
244
Question on Query execution
In the below query if the Patients table has 1000 records how many times TableValueFunction executes? Only once or 1000 time? This is a query in a Stored Procedure, do you have a better idea to improve this? SELECT * FROM Patients WHERE Patient.Id In (SELECT PatientId FROM TableValueFunction(parameters..))
sql
sql-server
sql-server-2005
tsql
query-execution-plans
null
open
Question on Query execution === In the below query if the Patients table has 1000 records how many times TableValueFunction executes? Only once or 1000 time? This is a query in a Stored Procedure, do you have a better idea to improve this? SELECT * FROM Patients WHERE Patient.Id In (SELECT PatientId FROM TableValueFunction(parameters..))
0
8,971,597
01/23/2012 12:28:25
1,127,099
01/03/2012 02:35:50
1
0
Creating a search using php and mysql.Like Amazon using my database
I am new to web-development, I want to create a website mainly for bookies.This question maybe posted earlier but I could not understand any. I want to create a search box in the homepage and the user has to search for his book from database(not other websites) through search box,it is similar to Amazon and Google websites.When search is complete the details of the book is shown. I am learning PHP and Mysql using xampp; Kindly suggest sites or books for reference or any other if you feel like.
php
mysql
database
search
website
01/24/2012 13:06:06
not a real question
Creating a search using php and mysql.Like Amazon using my database === I am new to web-development, I want to create a website mainly for bookies.This question maybe posted earlier but I could not understand any. I want to create a search box in the homepage and the user has to search for his book from database(not other websites) through search box,it is similar to Amazon and Google websites.When search is complete the details of the book is shown. I am learning PHP and Mysql using xampp; Kindly suggest sites or books for reference or any other if you feel like.
1
2,280,635
02/17/2010 12:43:36
202,020
11/03/2009 19:32:01
151
17
Where do I get figures about web application development?
I know this is not truly programming realted, but I think some of you might still have good hints for me: I'll do a research paper on web application development and for that I would like to have an overview of the dominant languages/frameworks in (Enterprise) Web-Application-Development. Of course I have gut feelings telling me about JEE and ASP.Net, but I strongly doubt, that my professor will accept "gut feelings" for evidence ;-) So, do any of you know if there are analyst reports or studies about this?
research
enterprise-development
null
null
null
02/19/2010 01:55:21
off topic
Where do I get figures about web application development? === I know this is not truly programming realted, but I think some of you might still have good hints for me: I'll do a research paper on web application development and for that I would like to have an overview of the dominant languages/frameworks in (Enterprise) Web-Application-Development. Of course I have gut feelings telling me about JEE and ASP.Net, but I strongly doubt, that my professor will accept "gut feelings" for evidence ;-) So, do any of you know if there are analyst reports or studies about this?
2
5,125,851
02/26/2011 08:23:46
295,524
03/17/2010 09:34:24
8
0
enable/disable zoom in Android WebView
There are some methods in WebSettings related to zoom: - WebSettings.setSupportZoom - WebSettings.setBuiltInZoomControls I noticed they work differently on some deveices. For example, on my Galaxy S pinch to zoom is enabled by default, but on LG P500 it is disabled (And now I don't know how to enable ONLY pinch to zoom, but hide zooming buttons). On P500 when I call setBuiltInZoomControls(true) i get both these variants working (multitouch and buttons). How to enable multitouch zoom and disable zooming buttons on devices such an LG P500? (Also, I know the same problems are on HTC devices)
android
webview
zoom
multitouch
null
null
open
enable/disable zoom in Android WebView === There are some methods in WebSettings related to zoom: - WebSettings.setSupportZoom - WebSettings.setBuiltInZoomControls I noticed they work differently on some deveices. For example, on my Galaxy S pinch to zoom is enabled by default, but on LG P500 it is disabled (And now I don't know how to enable ONLY pinch to zoom, but hide zooming buttons). On P500 when I call setBuiltInZoomControls(true) i get both these variants working (multitouch and buttons). How to enable multitouch zoom and disable zooming buttons on devices such an LG P500? (Also, I know the same problems are on HTC devices)
0
11,694,521
07/27/2012 19:32:51
10,833
09/16/2008 02:11:56
341
7
How can I fix the number of MinorGrid lines to a fixed number in Microsoft's .NET 4.0 Chart?
I am trying to set a fixed number of minor grid lines in a .NET 4.0 Chart whose X axis is in a Logarithmic scale. I try to set the "Axis.Minor.Interval" property, this only makes the grid lines disappear. chart1.ChartAreas[0].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount; chart1.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.Interval = 100d; chart1.ChartAreas[0].AxisX.MajorGrid.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MajorGrid.IntervalOffsetType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MajorGrid.Interval = 10d; chart1.ChartAreas[0].AxisX.MinorGrid.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MinorGrid.IntervalOffsetType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MinorGrid.Interval = 5; My goal is to have a logarithmic scale with a major grid every decade, showing 10 minor grid lines. Thanks
c#
winforms
charts
null
null
null
open
How can I fix the number of MinorGrid lines to a fixed number in Microsoft's .NET 4.0 Chart? === I am trying to set a fixed number of minor grid lines in a .NET 4.0 Chart whose X axis is in a Logarithmic scale. I try to set the "Axis.Minor.Interval" property, this only makes the grid lines disappear. chart1.ChartAreas[0].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount; chart1.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.Interval = 100d; chart1.ChartAreas[0].AxisX.MajorGrid.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MajorGrid.IntervalOffsetType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MajorGrid.Interval = 10d; chart1.ChartAreas[0].AxisX.MinorGrid.IntervalType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MinorGrid.IntervalOffsetType = DateTimeIntervalType.Number; chart1.ChartAreas[0].AxisX.MinorGrid.Interval = 5; My goal is to have a logarithmic scale with a major grid every decade, showing 10 minor grid lines. Thanks
0
11,728,496
07/30/2012 19:45:53
1,560,491
07/29/2012 04:32:01
1
1
when will the facebook sdk go out of beta?
Does anyone know the estimated date that the sdk will go out of beta so that it is ready to ship with apps?
ios
facebook
sdk
facebook-ios-sdk
null
07/30/2012 19:48:24
off topic
when will the facebook sdk go out of beta? === Does anyone know the estimated date that the sdk will go out of beta so that it is ready to ship with apps?
2
7,381,846
09/11/2011 22:56:10
939,653
09/11/2011 22:56:10
1
0
Whay this code don't get friend picture ?
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId:XXXXX, cookie: true, status: true, xfbml: true }); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> div id="profile_pics"></div> <script> var profilePicsDiv = document.getElementById('profile_pics'); FB.getLoginStatus(function(response) { if (response.status != 'connected') { profilePicsDiv.innerHTML = '<em>You are not connected</em>'; return; } FB.api({ method: 'friends.get' }, function(result) { Log.info('friends.get response', result); var markup = ''; var numFriends = result ? Math.min(5, result.length) : 0; if (numFriends > 0) { for (var i=0; i<numFriends; i++) { markup += ( '<fb:profile-pic size="square" ' + 'uid="' + result[i] + '" ' + 'facebook-logo="true"' + '></fb:profile-pic>' ); } } profilePicsDiv.innerHTML = markup; FB.XFBML.parse(profilePicsDiv); }); }); </script>
javascript
null
null
null
null
09/12/2011 04:59:20
not a real question
Whay this code don't get friend picture ? === <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId:XXXXX, cookie: true, status: true, xfbml: true }); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> div id="profile_pics"></div> <script> var profilePicsDiv = document.getElementById('profile_pics'); FB.getLoginStatus(function(response) { if (response.status != 'connected') { profilePicsDiv.innerHTML = '<em>You are not connected</em>'; return; } FB.api({ method: 'friends.get' }, function(result) { Log.info('friends.get response', result); var markup = ''; var numFriends = result ? Math.min(5, result.length) : 0; if (numFriends > 0) { for (var i=0; i<numFriends; i++) { markup += ( '<fb:profile-pic size="square" ' + 'uid="' + result[i] + '" ' + 'facebook-logo="true"' + '></fb:profile-pic>' ); } } profilePicsDiv.innerHTML = markup; FB.XFBML.parse(profilePicsDiv); }); }); </script>
1
431,409
01/10/2009 17:43:41
43,980
12/06/2008 19:59:56
47
1
What can I do with OpenSocial in terms of building 3rd party apps?
I have read the Open Social blog and am trying to build an app for one of the third parties that uses the Open Social model for their applications. And I'm still not clear what it enables me to do with our application, could someone provide an "OpenSocial for Dummies" breakdown? Some questions: * does it allow me to use the hosting web-site's login as authentication and sessionization for my web application (e.g., once someone has logged into the third-party, they are automatically authenticated for mine if it's built on OpenSocial? * does it allow for web service call to say grab selective information about that person's network? Thanks for the newbie question -- rather than banging my head, hoping to get a succinct answer.
opensocial
null
null
null
null
null
open
What can I do with OpenSocial in terms of building 3rd party apps? === I have read the Open Social blog and am trying to build an app for one of the third parties that uses the Open Social model for their applications. And I'm still not clear what it enables me to do with our application, could someone provide an "OpenSocial for Dummies" breakdown? Some questions: * does it allow me to use the hosting web-site's login as authentication and sessionization for my web application (e.g., once someone has logged into the third-party, they are automatically authenticated for mine if it's built on OpenSocial? * does it allow for web service call to say grab selective information about that person's network? Thanks for the newbie question -- rather than banging my head, hoping to get a succinct answer.
0
9,373,303
02/21/2012 06:43:31
690,668
04/04/2011 07:08:55
366
33
MemoryMappedFile or serialization, speed on very large object
I have a project that has a fairly complicated, nested (references calling the referenced objects up and down) object (class) stored in a dictionary like: public static Dictionary<string, Object1> DObject { get; set; } Object1 is a complicated class. It is not like a "address book" or "person info" class. The class itself has arrays, dictionaries of another object. Those object references class above it, etc. Because the size of the DObject can be 1GB+ in memory, I'm going to serialize it to a file using BinaryFormatter. Because I need to load this object, I was thinking of using MemoryMappedFile. New keys and values might be added to the dictionary. Objects might have more data in them (added/updated), etc. Does the MMF change size? How do I access a certain key in the DObject in the memory mapped file? Is there a searching mechanism like a hashtable in memory so I can find a certain key like a dictionary and get its value? How is this MMF work anyway? My ideal thought is. Have a large file on disk (2GB+). I update the object in the dictionary fast on the disk like having a memory saved on the disk. Everything is fast. Key-value look up all the way. I look up, edit the value, save, etc... I would have to have quick access to this 2GB+ object any time I want. If the WCF server restarts, I would need quick access to this 2GB+ size object. That's why I was thinking 1) serialization 2). load and read from/to MMF. My main concern is speed at this moment. I can't be reloading this 2GB data from scratch everytime I debug the project in other words (it takes long time). Any suggestions, ideas and thoughts on how I should handle this situation.
c#
serialization
deserialization
memory-mapped-files
memory-mapping
null
open
MemoryMappedFile or serialization, speed on very large object === I have a project that has a fairly complicated, nested (references calling the referenced objects up and down) object (class) stored in a dictionary like: public static Dictionary<string, Object1> DObject { get; set; } Object1 is a complicated class. It is not like a "address book" or "person info" class. The class itself has arrays, dictionaries of another object. Those object references class above it, etc. Because the size of the DObject can be 1GB+ in memory, I'm going to serialize it to a file using BinaryFormatter. Because I need to load this object, I was thinking of using MemoryMappedFile. New keys and values might be added to the dictionary. Objects might have more data in them (added/updated), etc. Does the MMF change size? How do I access a certain key in the DObject in the memory mapped file? Is there a searching mechanism like a hashtable in memory so I can find a certain key like a dictionary and get its value? How is this MMF work anyway? My ideal thought is. Have a large file on disk (2GB+). I update the object in the dictionary fast on the disk like having a memory saved on the disk. Everything is fast. Key-value look up all the way. I look up, edit the value, save, etc... I would have to have quick access to this 2GB+ object any time I want. If the WCF server restarts, I would need quick access to this 2GB+ size object. That's why I was thinking 1) serialization 2). load and read from/to MMF. My main concern is speed at this moment. I can't be reloading this 2GB data from scratch everytime I debug the project in other words (it takes long time). Any suggestions, ideas and thoughts on how I should handle this situation.
0
11,584,107
07/20/2012 17:20:28
772,374
05/27/2011 02:47:31
62
10
How to deal with Android XLarge screen?
I have developed a clock widget. Looks fine on many devices. Except Motorola Xoom since it falls under XLARGE category. This is the clock.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="#00000000" android:layout_width="wrap_content" android:layout_height="wrap_content"> <AnalogClock android:id="@+id/AnalogClock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:dial="@drawable/widgetclock" android:hand_hour="@drawable/widgethour" android:hand_minute="@drawable/widgetminute" /> <!-- Time Row --> <LinearLayout android:id="@+id/lltimeheaderrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center|top" android:layout_marginTop="45dp" android:visibility="gone"> <!-- TIME --> <LinearLayout android:id="@+id/llTimeDefault" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:gravity="center"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/HOUR" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="15sp"/> <TextView android:id="@+id/MINUTE" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="15sp" /> </LinearLayout> <TextView android:id="@+id/AM_PM" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="13sp" android:padding="1dp" /> </LinearLayout> </LinearLayout> <!-- Calendar Graph --> <LinearLayout android:id="@+id/llCalGraph" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center|left" android:layout_marginLeft="45dp"> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:id="@+id/CalendarImg" android:src="@drawable/calendar" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/DateDayG" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center|top" android:layout_marginTop="3dp" android:textSize="11sp" android:textStyle="bold" android:textColor="@color/my_gray" android:shadowColor="@color/my_black" android:shadowDx="1" android:shadowDy="1" android:shadowRadius="2" ></TextView> <TextView android:id="@+id/DateNoG" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="5dp" android:textSize="25sp" android:textColor="@color/my_gray" ></TextView> </FrameLayout> </LinearLayout> <!-- BATTERY --> <LinearLayout android:id="@+id/llBattGraph" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center|right" android:layout_marginRight="45dp"> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:id="@+id/BatteryImg" android:src="@drawable/batt_00" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <ImageView android:id="@+id/BatteryFlashing" android:src="@drawable/flashing" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="13dp" android:layout_marginLeft="2dp" android:visibility="gone" /> <TextView android:id="@+id/BatteryLevel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textSize="18sp" android:layout_gravity="center" /> </FrameLayout> </LinearLayout> <!-- Weather Row --> <LinearLayout android:id="@+id/llweatherrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center|bottom" android:layout_marginBottom="45dp"> <!-- WEATHER IMAGE --> <LinearLayout android:id="@+id/llWeatherImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="visible" android:layout_gravity="center"> <ImageView android:id="@+id/ivWeather" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/w3200" /> </LinearLayout> </LinearLayout> </FrameLayout> Basically it has 4 elements on the widget. Upper, Bottom. Left and Right Part. I simply use FrameLayout as a base Layout and each element is using LinearLayout with gravity 45dp to each corner. This is how the widget looks on Xoom I am expecting the elements position should be on the red circle I draw. 1. What is the best Layout combination should I use? Can you suggest? 2. Let's say I'm sticking to this layout. How do I provide alternative layout for Xoom device? I tried to put clock.xml on layout-xlarge and on drawable-xlarge but nothing... ![enter image description here][1] [1]: http://i.stack.imgur.com/8zHIJ.jpg
android
layout
xoom
null
null
null
open
How to deal with Android XLarge screen? === I have developed a clock widget. Looks fine on many devices. Except Motorola Xoom since it falls under XLARGE category. This is the clock.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="#00000000" android:layout_width="wrap_content" android:layout_height="wrap_content"> <AnalogClock android:id="@+id/AnalogClock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:dial="@drawable/widgetclock" android:hand_hour="@drawable/widgethour" android:hand_minute="@drawable/widgetminute" /> <!-- Time Row --> <LinearLayout android:id="@+id/lltimeheaderrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center|top" android:layout_marginTop="45dp" android:visibility="gone"> <!-- TIME --> <LinearLayout android:id="@+id/llTimeDefault" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:gravity="center"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/HOUR" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="15sp"/> <TextView android:id="@+id/MINUTE" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="15sp" /> </LinearLayout> <TextView android:id="@+id/AM_PM" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textStyle="bold" android:textSize="13sp" android:padding="1dp" /> </LinearLayout> </LinearLayout> <!-- Calendar Graph --> <LinearLayout android:id="@+id/llCalGraph" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center|left" android:layout_marginLeft="45dp"> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:id="@+id/CalendarImg" android:src="@drawable/calendar" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/DateDayG" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center|top" android:layout_marginTop="3dp" android:textSize="11sp" android:textStyle="bold" android:textColor="@color/my_gray" android:shadowColor="@color/my_black" android:shadowDx="1" android:shadowDy="1" android:shadowRadius="2" ></TextView> <TextView android:id="@+id/DateNoG" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="5dp" android:textSize="25sp" android:textColor="@color/my_gray" ></TextView> </FrameLayout> </LinearLayout> <!-- BATTERY --> <LinearLayout android:id="@+id/llBattGraph" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center|right" android:layout_marginRight="45dp"> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:id="@+id/BatteryImg" android:src="@drawable/batt_00" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <ImageView android:id="@+id/BatteryFlashing" android:src="@drawable/flashing" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="13dp" android:layout_marginLeft="2dp" android:visibility="gone" /> <TextView android:id="@+id/BatteryLevel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/my_gray" android:textSize="18sp" android:layout_gravity="center" /> </FrameLayout> </LinearLayout> <!-- Weather Row --> <LinearLayout android:id="@+id/llweatherrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center|bottom" android:layout_marginBottom="45dp"> <!-- WEATHER IMAGE --> <LinearLayout android:id="@+id/llWeatherImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="visible" android:layout_gravity="center"> <ImageView android:id="@+id/ivWeather" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/w3200" /> </LinearLayout> </LinearLayout> </FrameLayout> Basically it has 4 elements on the widget. Upper, Bottom. Left and Right Part. I simply use FrameLayout as a base Layout and each element is using LinearLayout with gravity 45dp to each corner. This is how the widget looks on Xoom I am expecting the elements position should be on the red circle I draw. 1. What is the best Layout combination should I use? Can you suggest? 2. Let's say I'm sticking to this layout. How do I provide alternative layout for Xoom device? I tried to put clock.xml on layout-xlarge and on drawable-xlarge but nothing... ![enter image description here][1] [1]: http://i.stack.imgur.com/8zHIJ.jpg
0
8,062,377
11/09/2011 08:50:26
870,578
07/30/2011 10:51:07
53
0
Beta Testing for Xcode 4.0.1 based app
I'm using xcode 4.0.1.I need to test my app in IPad....Can anyone post the links tat shows the standard procedures...
iphone
testing
null
null
null
11/09/2011 10:57:29
not a real question
Beta Testing for Xcode 4.0.1 based app === I'm using xcode 4.0.1.I need to test my app in IPad....Can anyone post the links tat shows the standard procedures...
1
4,935,203
02/08/2011 15:52:30
385,559
07/07/2010 13:18:18
452
16
Looping through the samples of CAF file
Could anyone give me a suggestion or an example of how I would loop through the samples of CAF file? Like taking the first 1000 samples and changing them to 0? Something like: for(int i=0; i < numberOfSamples; i++) { cafFile.sample[i] = methodThatUsesSampleValue(cafFile.sample[i]); } Keep in mind: 1. I don't need to do this live. No buffers, etc. needed. 2. I would like to do this in C, C++ or Objective-C. 3. Would like to be able to use the code on the iOs platform. Any help appreciated!
c++
c
audio
signal-processing
caf
null
open
Looping through the samples of CAF file === Could anyone give me a suggestion or an example of how I would loop through the samples of CAF file? Like taking the first 1000 samples and changing them to 0? Something like: for(int i=0; i < numberOfSamples; i++) { cafFile.sample[i] = methodThatUsesSampleValue(cafFile.sample[i]); } Keep in mind: 1. I don't need to do this live. No buffers, etc. needed. 2. I would like to do this in C, C++ or Objective-C. 3. Would like to be able to use the code on the iOs platform. Any help appreciated!
0
9,712,188
03/15/2012 00:05:11
1,270,381
03/14/2012 23:55:00
1
0
Android round float
I would like to round a float to two digits and then set it as the text of a button. I have tried multiple techniques and none of them seem to work. Can you tell me what i am doing wrong or a new way to do this. what i have tried DecimalFormat price = new DecimalFormat("#.00"); // price.format(cheeses); public static String roundToOneDigit(float paramFloat) { return String.format("%.2f%n", paramFloat); button3.setText("Increase price" + "$%3.2f\n"+ cheeses); //float f = round(cheeses,2); // float f = new DecimalFormat("#.##").format(cheeses).tofloat(); f *= 100; // f = (float)Math.round(f)/100;
java
android
float
round
null
03/16/2012 15:45:03
not a real question
Android round float === I would like to round a float to two digits and then set it as the text of a button. I have tried multiple techniques and none of them seem to work. Can you tell me what i am doing wrong or a new way to do this. what i have tried DecimalFormat price = new DecimalFormat("#.00"); // price.format(cheeses); public static String roundToOneDigit(float paramFloat) { return String.format("%.2f%n", paramFloat); button3.setText("Increase price" + "$%3.2f\n"+ cheeses); //float f = round(cheeses,2); // float f = new DecimalFormat("#.##").format(cheeses).tofloat(); f *= 100; // f = (float)Math.round(f)/100;
1
9,974,245
04/02/2012 09:52:48
229,616
12/11/2009 12:36:57
319
6
android widget text view marquee scroll
can a widget have a marquee textview? if so how would i implement it? i have tried the following: <TextView android:id="@+id/followers" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_weight="10" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:singleLine="true" android:text="@string/load" android:textColor="@color/white" android:textSize="24dip" android:textStyle="bold" android:scrollHorizontally="true" > </TextView> i know this marquee works as i have made this same textview for a normal app activity and the marquee is working. it just isnt working for the widget side. the size of the text is longer that the width so that should work. any help as usual would be much appreciated
android
android-layout
android-widget
marquee
null
null
open
android widget text view marquee scroll === can a widget have a marquee textview? if so how would i implement it? i have tried the following: <TextView android:id="@+id/followers" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_weight="10" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:singleLine="true" android:text="@string/load" android:textColor="@color/white" android:textSize="24dip" android:textStyle="bold" android:scrollHorizontally="true" > </TextView> i know this marquee works as i have made this same textview for a normal app activity and the marquee is working. it just isnt working for the widget side. the size of the text is longer that the width so that should work. any help as usual would be much appreciated
0
8,758,777
01/06/2012 13:47:08
441,824
09/07/2010 20:52:11
16
0
CDOSys having issue with multiple attachments
I have been using CDOSys object for email sending in Classic ASP and it's work well with single file attachment but does not work correctly for multiple attachments.It takes the name and file extension of last attachment file for all attachments.Please let me know where is the issue.Below is my code Function Send_Email_WithAttachments(strFrom,strTo,strSubject,strBody,strCC,strBCC,arrFiles,arrText) Dim mailObj,I Set mailObj=CreateObject("CDO.Message") With mailObj .Subject=strSubject .From=strFrom .To=strTo If isValidEmail(strCC) = True Then .CC = strCC End If If isValidEmail(strBCC) = True Then .BCc = strBCC End If .HTMLBody = strBody If IsArray(arrFiles) = True Then For I=0 To UBound(arrFiles) .AddAttachment arrFiles(I) With mailObj.Attachments(1).Fields .Item(cdoContentDisposition) = "attachment;filename="&arrText(I) .Update End With Next End If .Send End With Set mailObj=Nothing End Function Thanks, Ravi
email
null
null
null
null
null
open
CDOSys having issue with multiple attachments === I have been using CDOSys object for email sending in Classic ASP and it's work well with single file attachment but does not work correctly for multiple attachments.It takes the name and file extension of last attachment file for all attachments.Please let me know where is the issue.Below is my code Function Send_Email_WithAttachments(strFrom,strTo,strSubject,strBody,strCC,strBCC,arrFiles,arrText) Dim mailObj,I Set mailObj=CreateObject("CDO.Message") With mailObj .Subject=strSubject .From=strFrom .To=strTo If isValidEmail(strCC) = True Then .CC = strCC End If If isValidEmail(strBCC) = True Then .BCc = strBCC End If .HTMLBody = strBody If IsArray(arrFiles) = True Then For I=0 To UBound(arrFiles) .AddAttachment arrFiles(I) With mailObj.Attachments(1).Fields .Item(cdoContentDisposition) = "attachment;filename="&arrText(I) .Update End With Next End If .Send End With Set mailObj=Nothing End Function Thanks, Ravi
0
5,423,958
03/24/2011 18:46:08
274,018
02/16/2010 02:41:05
30
0
cURL Authentication Problems Datatel R25 XML Feed
I am still fairly new at playing with PHP. I wanted to poke at a small project. I have the ability to access an xml feed from our calendar system at work. The feed requires authentication with a username and password. I am trying to automate pulling this feed. My hope is to one day use it to automate the scheduling of another system but for now I'm just trying to get this side working. I have read through some of the cURL documentation on php.net. I have also searched through stackoverflow for a few examples. They were helpful in getting me started but not much further. Below is what I have so far. But all I get back is: > UNAUTHORIZED The request requires > authorization So I'm racking my head to figure out what might be the issue. Part of my problem I'm sure is my ignorance with the actual process behind what is going on between the client and server. When I interact with it normally I just go to the feed URL, the browser prompts me for a username and password, and then after putting that in it gives me an xml page. I've checked for most of the formatting errors and syntax errors I knew to look for. That may still be it but at this point I think it's more my lack of understanding how it all fits together. Thanks for any help. Similar issues: http://stackoverflow.com/questions/2868671/parsing-xml-data-with-namespaces-in-php http://stackoverflow.com/questions/4957002/curl-http-authentication-at-server-side <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://somesight.someplace.edu/r25ws/servlet/wrd/run/events.xml"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1); $output = curl_exec($ch); curl_close($ch); echo $output; ?>
php
xml
curl
null
null
null
open
cURL Authentication Problems Datatel R25 XML Feed === I am still fairly new at playing with PHP. I wanted to poke at a small project. I have the ability to access an xml feed from our calendar system at work. The feed requires authentication with a username and password. I am trying to automate pulling this feed. My hope is to one day use it to automate the scheduling of another system but for now I'm just trying to get this side working. I have read through some of the cURL documentation on php.net. I have also searched through stackoverflow for a few examples. They were helpful in getting me started but not much further. Below is what I have so far. But all I get back is: > UNAUTHORIZED The request requires > authorization So I'm racking my head to figure out what might be the issue. Part of my problem I'm sure is my ignorance with the actual process behind what is going on between the client and server. When I interact with it normally I just go to the feed URL, the browser prompts me for a username and password, and then after putting that in it gives me an xml page. I've checked for most of the formatting errors and syntax errors I knew to look for. That may still be it but at this point I think it's more my lack of understanding how it all fits together. Thanks for any help. Similar issues: http://stackoverflow.com/questions/2868671/parsing-xml-data-with-namespaces-in-php http://stackoverflow.com/questions/4957002/curl-http-authentication-at-server-side <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://somesight.someplace.edu/r25ws/servlet/wrd/run/events.xml"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1); $output = curl_exec($ch); curl_close($ch); echo $output; ?>
0
3,078,289
06/20/2010 05:07:42
156,982
08/15/2009 17:54:31
434
0
How do I convince programmers in my team to do TDD?
I am aware of this question: [http://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd][1] In my team, we write a lot of unit tests. But, in general the programmers tend to write unit tests after wrting the code. So, we first finish the module functionality and then write tests. Our coverage is around 70% for most modules. I have tried convincing my technical manager and my team members to do pure TDD wherein we first write tests and then the code, but invain. I think writing tests first allows us to discover design better. Am I just being finicky, especially when our coverage is quite high? If the answer to this question is no, then how do I talk to people to have a test-first approach. [1]: http://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd
unit-testing
tdd
team
null
null
07/07/2012 02:32:22
not constructive
How do I convince programmers in my team to do TDD? === I am aware of this question: [http://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd][1] In my team, we write a lot of unit tests. But, in general the programmers tend to write unit tests after wrting the code. So, we first finish the module functionality and then write tests. Our coverage is around 70% for most modules. I have tried convincing my technical manager and my team members to do pure TDD wherein we first write tests and then the code, but invain. I think writing tests first allows us to discover design better. Am I just being finicky, especially when our coverage is quite high? If the answer to this question is no, then how do I talk to people to have a test-first approach. [1]: http://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd
4
11,602,096
07/22/2012 16:42:54
1,544,185
07/22/2012 16:23:15
1
0
How to link rlu form data base records
Help please iam making link directory..so as user enter the records in data base url ,and title they are same as he enter i want when i show links on my page using select statement they will link to website if user enter www.jobs.com and title Jobs in India i want that on my page title should be link with www.jobs.com and below there is www.job.com please help any one my code is while ($row = $result->fetch_object()) { echo "<tr>"; echo "<td>$row->url</td>"; echo"<tr>"; echo "<td>" . $row->title . "</td>"; echo"<tr>"; echo "<td>" . $row->description . "</td>"; echo"<tr>"; echo "<td>$row->keyword<hr> </td>"; echo"<tr>"; echo "</tr>"; } ------------------------------------------------------------------------
php
null
null
null
null
07/23/2012 12:28:18
too localized
How to link rlu form data base records === Help please iam making link directory..so as user enter the records in data base url ,and title they are same as he enter i want when i show links on my page using select statement they will link to website if user enter www.jobs.com and title Jobs in India i want that on my page title should be link with www.jobs.com and below there is www.job.com please help any one my code is while ($row = $result->fetch_object()) { echo "<tr>"; echo "<td>$row->url</td>"; echo"<tr>"; echo "<td>" . $row->title . "</td>"; echo"<tr>"; echo "<td>" . $row->description . "</td>"; echo"<tr>"; echo "<td>$row->keyword<hr> </td>"; echo"<tr>"; echo "</tr>"; } ------------------------------------------------------------------------
3
9,884,038
03/27/2012 05:53:49
924,870
09/02/2011 08:20:30
124
26
Android : View and hide included layouts in relative layout
I have two layouts, one is the main layout inside which I am including my custom keypad layout. When ever I hide the included layout, the main layout gets distorted. Pls. help. My main layout xml is as follows. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root_rl" android:layout_width="fill_parent" android:layout_height="match_parent" android:background="@drawable/gradient_header" > <LinearLayout android:id="@+id/linHeader" style="@style/linHeader" android:layout_height="55dp" android:baselineAligned="false" android:weightSum="1" > <LinearLayout android:id="@+id/linLogo" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".60" android:gravity="center_vertical" > <TextView android:id="@+id/tvOutletName" style="@style/linHeader_text" android:text="" > </TextView> </LinearLayout> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight=".40" android:gravity="right|center_vertical" > <LinearLayout android:id="@+id/btnAdvList" style="@style/btnChart" android:onClick="btnAdvList" > </LinearLayout> <LinearLayout android:id="@+id/btnDownArrow" style="@style/btnDownArrow" android:onClick="btnCollapseExpand" > </LinearLayout> <LinearLayout android:id="@+id/btnRightArrow" style="@style/btnRightArrow" android:onClick="btnDone" > </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:id="@+id/linSearch" style="@style/linSearch" android:layout_below="@+id/linHeader" > <EditText android:id="@+id/etSearchText" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:layout_marginRight="8dp" android:layout_weight="1" android:hint="@string/LblText_Search" /> </LinearLayout> <LinearLayout android:id="@+id/linInfo" style="@style/linInfo" android:layout_below="@+id/linSearch" > <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> <Spinner android:id="@+id/spinner2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> <Spinner android:id="@+id/spinner3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> </LinearLayout> <LinearLayout android:id="@+id/linTitle" style="@style/lstTitle" android:layout_below="@+id/linInfo" > <TextView android:id="@+id/tvItems" style="@style/lstTitleText" android:layout_width="0dp" android:layout_weight="2" android:text="@string/LblText_Items" > </TextView> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/lsttitle_seperator" > </ImageView> <TextView android:id="@+id/tvOrder" style="@style/lstTitleText" android:layout_width="0dp" android:layout_weight="1" android:text="@string/AdvList_Order" > </TextView> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/lsttitle_seperator" > </ImageView> <TextView android:id="@+id/tvTotal" style="@style/lstTitleText_Right" android:layout_width="0dp" android:layout_weight="1" android:text="@string/AdvList_Total" > </TextView> </LinearLayout> <LinearLayout android:id="@+id/linBody" style="@style/linBody" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_above="@+id/linKeypad" android:layout_below="@+id/linTitle" android:orientation="vertical" android:weightSum="1" > <ExpandableListView android:id="@+id/expandableList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000" android:childDivider="#fff" android:focusable="true" android:groupIndicator="@android:color/transparent" > </ExpandableListView> </LinearLayout> <LinearLayout android:id="@+id/linKeypad" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/linFooter" > <include android:id="@+id/linearLayoutKeyPad" android:layout_width="match_parent" android:layout_height="wrap_content" layout="@layout/custom_decimal_keypad" /> </LinearLayout> <LinearLayout android:id="@+id/linFooter" style="@style/linFooter" > <TextView android:id="@+id/tvOrdersTaken" style="@style/linFooter_text" android:layout_weight="1" > </TextView> <TextView android:id="@+id/tvTotalValue" style="@style/linFooter_text" android:layout_weight="1" android:gravity="right" > </TextView> </LinearLayout> </RelativeLayout> and the included keypad layout is as follows <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayoutKeyPad" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#efefef" android:orientation="vertical" > <TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#999" android:gravity="center_horizontal" > <Button android:id="@+id/btnKeyPad0" android:layout_width="40dip" android:onClick="btnKeyPad0" android:text="0" > </Button> <Button android:id="@+id/btnKeyPad1" android:layout_width="40dip" android:onClick="btnKeyPad1" android:text="1" > </Button> <Button android:id="@+id/btnKeyPad2" android:layout_width="40dip" android:onClick="btnKeyPad2" android:text="2" > </Button> <Button android:id="@+id/btnKeyPad3" android:layout_width="40dip" android:onClick="btnKeyPad3" android:text="3" > </Button> <Button android:id="@+id/btnKeyPad4" android:layout_width="40dip" android:onClick="btnKeyPad4" android:text="4" > </Button> <ImageButton android:id="@+id/btnKeyPadBackSpace" android:layout_width="40dip" android:onClick="btnKeyPadBackSpace" android:src="@drawable/backspace" > </ImageButton> </TableRow> </TableLayout> <TableLayout android:id="@+id/tableLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#999" android:gravity="center_horizontal" > <Button android:id="@+id/btnKeyPad5" android:layout_width="40dip" android:onClick="btnKeyPad5" android:text="5" > </Button> <Button android:id="@+id/btnKeyPad6" android:layout_width="40dip" android:onClick="btnKeyPad6" android:text="6" > </Button> <Button android:id="@+id/btnKeyPad7" android:layout_width="40dip" android:onClick="btnKeyPad7" android:text="7" > </Button> <Button android:id="@+id/btnKeyPad8" android:layout_width="40dip" android:onClick="btnKeyPad8" android:text="8" > </Button> <Button android:id="@+id/btnKeyPad9" android:layout_width="40dip" android:onClick="btnKeyPad9" android:text="9" > </Button> <Button android:id="@+id/btnKeyPadDecimal" android:layout_width="40dip" android:onClick="btnKeyPadDecimal" android:text="." > </Button> <Button android:id="@+id/btnKeyPadOk" android:layout_width="43dip" android:onClick="btnKeyPadOk" android:text="@string/LblText_Ok" > </Button> </TableRow> </TableLayout> </LinearLayout> The screenshot of the layout before viewing the keypad : http://i39.tinypic.com/29urqf7.png and the screenshot of the distorted layout after making keypad visible : http://i40.tinypic.com/i3tdab.png I also tried to refresh the child view, invalidate the view, programatically modify the relative layout. Please help me with some solutions. If I dont put the list above the keypad, it doesnt distort, but the list view gets hidden behind the keypad which is not useful. I basically need the keypad to push the list view up when it gets visible and back to normal when it is gone.
android
relativelayout
expandablelistview
visible
null
null
open
Android : View and hide included layouts in relative layout === I have two layouts, one is the main layout inside which I am including my custom keypad layout. When ever I hide the included layout, the main layout gets distorted. Pls. help. My main layout xml is as follows. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root_rl" android:layout_width="fill_parent" android:layout_height="match_parent" android:background="@drawable/gradient_header" > <LinearLayout android:id="@+id/linHeader" style="@style/linHeader" android:layout_height="55dp" android:baselineAligned="false" android:weightSum="1" > <LinearLayout android:id="@+id/linLogo" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".60" android:gravity="center_vertical" > <TextView android:id="@+id/tvOutletName" style="@style/linHeader_text" android:text="" > </TextView> </LinearLayout> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight=".40" android:gravity="right|center_vertical" > <LinearLayout android:id="@+id/btnAdvList" style="@style/btnChart" android:onClick="btnAdvList" > </LinearLayout> <LinearLayout android:id="@+id/btnDownArrow" style="@style/btnDownArrow" android:onClick="btnCollapseExpand" > </LinearLayout> <LinearLayout android:id="@+id/btnRightArrow" style="@style/btnRightArrow" android:onClick="btnDone" > </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:id="@+id/linSearch" style="@style/linSearch" android:layout_below="@+id/linHeader" > <EditText android:id="@+id/etSearchText" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:layout_marginRight="8dp" android:layout_weight="1" android:hint="@string/LblText_Search" /> </LinearLayout> <LinearLayout android:id="@+id/linInfo" style="@style/linInfo" android:layout_below="@+id/linSearch" > <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> <Spinner android:id="@+id/spinner2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> <Spinner android:id="@+id/spinner3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" > </Spinner> </LinearLayout> <LinearLayout android:id="@+id/linTitle" style="@style/lstTitle" android:layout_below="@+id/linInfo" > <TextView android:id="@+id/tvItems" style="@style/lstTitleText" android:layout_width="0dp" android:layout_weight="2" android:text="@string/LblText_Items" > </TextView> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/lsttitle_seperator" > </ImageView> <TextView android:id="@+id/tvOrder" style="@style/lstTitleText" android:layout_width="0dp" android:layout_weight="1" android:text="@string/AdvList_Order" > </TextView> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/lsttitle_seperator" > </ImageView> <TextView android:id="@+id/tvTotal" style="@style/lstTitleText_Right" android:layout_width="0dp" android:layout_weight="1" android:text="@string/AdvList_Total" > </TextView> </LinearLayout> <LinearLayout android:id="@+id/linBody" style="@style/linBody" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_above="@+id/linKeypad" android:layout_below="@+id/linTitle" android:orientation="vertical" android:weightSum="1" > <ExpandableListView android:id="@+id/expandableList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000" android:childDivider="#fff" android:focusable="true" android:groupIndicator="@android:color/transparent" > </ExpandableListView> </LinearLayout> <LinearLayout android:id="@+id/linKeypad" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/linFooter" > <include android:id="@+id/linearLayoutKeyPad" android:layout_width="match_parent" android:layout_height="wrap_content" layout="@layout/custom_decimal_keypad" /> </LinearLayout> <LinearLayout android:id="@+id/linFooter" style="@style/linFooter" > <TextView android:id="@+id/tvOrdersTaken" style="@style/linFooter_text" android:layout_weight="1" > </TextView> <TextView android:id="@+id/tvTotalValue" style="@style/linFooter_text" android:layout_weight="1" android:gravity="right" > </TextView> </LinearLayout> </RelativeLayout> and the included keypad layout is as follows <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayoutKeyPad" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#efefef" android:orientation="vertical" > <TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#999" android:gravity="center_horizontal" > <Button android:id="@+id/btnKeyPad0" android:layout_width="40dip" android:onClick="btnKeyPad0" android:text="0" > </Button> <Button android:id="@+id/btnKeyPad1" android:layout_width="40dip" android:onClick="btnKeyPad1" android:text="1" > </Button> <Button android:id="@+id/btnKeyPad2" android:layout_width="40dip" android:onClick="btnKeyPad2" android:text="2" > </Button> <Button android:id="@+id/btnKeyPad3" android:layout_width="40dip" android:onClick="btnKeyPad3" android:text="3" > </Button> <Button android:id="@+id/btnKeyPad4" android:layout_width="40dip" android:onClick="btnKeyPad4" android:text="4" > </Button> <ImageButton android:id="@+id/btnKeyPadBackSpace" android:layout_width="40dip" android:onClick="btnKeyPadBackSpace" android:src="@drawable/backspace" > </ImageButton> </TableRow> </TableLayout> <TableLayout android:id="@+id/tableLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#999" android:gravity="center_horizontal" > <Button android:id="@+id/btnKeyPad5" android:layout_width="40dip" android:onClick="btnKeyPad5" android:text="5" > </Button> <Button android:id="@+id/btnKeyPad6" android:layout_width="40dip" android:onClick="btnKeyPad6" android:text="6" > </Button> <Button android:id="@+id/btnKeyPad7" android:layout_width="40dip" android:onClick="btnKeyPad7" android:text="7" > </Button> <Button android:id="@+id/btnKeyPad8" android:layout_width="40dip" android:onClick="btnKeyPad8" android:text="8" > </Button> <Button android:id="@+id/btnKeyPad9" android:layout_width="40dip" android:onClick="btnKeyPad9" android:text="9" > </Button> <Button android:id="@+id/btnKeyPadDecimal" android:layout_width="40dip" android:onClick="btnKeyPadDecimal" android:text="." > </Button> <Button android:id="@+id/btnKeyPadOk" android:layout_width="43dip" android:onClick="btnKeyPadOk" android:text="@string/LblText_Ok" > </Button> </TableRow> </TableLayout> </LinearLayout> The screenshot of the layout before viewing the keypad : http://i39.tinypic.com/29urqf7.png and the screenshot of the distorted layout after making keypad visible : http://i40.tinypic.com/i3tdab.png I also tried to refresh the child view, invalidate the view, programatically modify the relative layout. Please help me with some solutions. If I dont put the list above the keypad, it doesnt distort, but the list view gets hidden behind the keypad which is not useful. I basically need the keypad to push the list view up when it gets visible and back to normal when it is gone.
0
8,681,662
12/30/2011 16:32:23
706,780
04/13/2011 20:29:31
1,847
129
Lock ubuntu from shell script
I usually lock my ubuntu with Ctrl + Alt + L but, I want to run ssh from one machine to other and to be able to lock that machine, is this possible ? my plan is if possible to run some shell script to lock the second machine.
linux
shell
script
ssh
locking
12/31/2011 23:04:24
off topic
Lock ubuntu from shell script === I usually lock my ubuntu with Ctrl + Alt + L but, I want to run ssh from one machine to other and to be able to lock that machine, is this possible ? my plan is if possible to run some shell script to lock the second machine.
2
7,062,501
08/15/2011 07:18:54
768,392
05/24/2011 19:28:00
62
15
Creating an Amazon S3 Bucket using jQuery and REST
I am wanting to try and do a handful of things with the use of jQuery and Amazons S3 API via REST. My key issue is not being familiar with REST well enough (or not as well as I thought I knew) to know if this approach would even remotely work right. I have tried searching endlessly for some tidbit of an example and came up fruitless, maybe I am searching for the wrong things I don't know, but as a last ditch effort I figured I'd hit up my new favorite place, here.. What I need to do is send. PUT a request to the API to create the bucket. Based on the S3 API docs I came up with var AWSAccessKeyId = ""; var AWSSecretAccessKey = ""; var AWSDomain = ".s3.amazonaws.com"; function createNewBucket(bucketName) { var bucketString = 'HTTP/1.1\n'; bucketString += bucketName + AWSDomain + '\n'; bucketString += 'Content-Length: 0 \n'; bucketString += 'Date: Wed, 01 Mar 2009 12:00:00 GMT \n'; bucketString += 'Authorization: AWS ' + sha1_string; $.ajax({ url: bucketName + AWSDomain, type: 'PUT', data: bucketString, success: function(data) { }, error: '' }); } though concept isn't complete with the above I am just starting it out, and I started questioning if this idea of approach was even going to work.. And if it is to work with the above or in any means provided here for help how would I also work with the response to know if it was successful or not? I know if I can nail this one piece down I can handle for the most part the rest of my issues to come. Its just tackling the first hump and figuring out if I am going about it the right way. Its also worth mentioning that I have been tasked with doing this purely javascript style with or without the help of a lib like jquery. I can't use PHP, or the like in this concept. So if anyone can throw me a bone i'd be greatly appreciative. On a side note, does anyone know if theres a means of actually testing something like this stuff out without actually having a S3 account, cause I can't afford to pay for an account just for the sake of testing let alone any other reason.
javascript
jquery
rest
amazon-s3
null
null
open
Creating an Amazon S3 Bucket using jQuery and REST === I am wanting to try and do a handful of things with the use of jQuery and Amazons S3 API via REST. My key issue is not being familiar with REST well enough (or not as well as I thought I knew) to know if this approach would even remotely work right. I have tried searching endlessly for some tidbit of an example and came up fruitless, maybe I am searching for the wrong things I don't know, but as a last ditch effort I figured I'd hit up my new favorite place, here.. What I need to do is send. PUT a request to the API to create the bucket. Based on the S3 API docs I came up with var AWSAccessKeyId = ""; var AWSSecretAccessKey = ""; var AWSDomain = ".s3.amazonaws.com"; function createNewBucket(bucketName) { var bucketString = 'HTTP/1.1\n'; bucketString += bucketName + AWSDomain + '\n'; bucketString += 'Content-Length: 0 \n'; bucketString += 'Date: Wed, 01 Mar 2009 12:00:00 GMT \n'; bucketString += 'Authorization: AWS ' + sha1_string; $.ajax({ url: bucketName + AWSDomain, type: 'PUT', data: bucketString, success: function(data) { }, error: '' }); } though concept isn't complete with the above I am just starting it out, and I started questioning if this idea of approach was even going to work.. And if it is to work with the above or in any means provided here for help how would I also work with the response to know if it was successful or not? I know if I can nail this one piece down I can handle for the most part the rest of my issues to come. Its just tackling the first hump and figuring out if I am going about it the right way. Its also worth mentioning that I have been tasked with doing this purely javascript style with or without the help of a lib like jquery. I can't use PHP, or the like in this concept. So if anyone can throw me a bone i'd be greatly appreciative. On a side note, does anyone know if theres a means of actually testing something like this stuff out without actually having a S3 account, cause I can't afford to pay for an account just for the sake of testing let alone any other reason.
0
7,290,913
09/03/2011 03:11:54
925,926
09/02/2011 19:53:39
1
0
Javascript functions are not executing in the contentarea.php
This the main page code <?php session_start(); require_once("checkuser.php"); checkuser(); require_once("includes/pagefunction.php"); require_once("includes/config.php"); require_once("fajax.php"); include("includes/Top.php"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>:: Project Page ::</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script language="JavaScript" src="selectcustomer.js"></script> </head> <script language="javascript"> </script> <body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td colspan="3" align="center" valign="top"> </td> </tr> <tr> <td width="190" valign="top" height="100%"><?php include("includes/Left.php");?> </td> <td width="100%" align="left" valign="top" style="padding-top:25px;"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border" height="250"> <tr> <td><table width="83%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border"> <tr nowrap > <td colspan="3" valign="middle" nowrap style="padding-top:20px; padding-left:48px;" class="alert9pxNormal" align="center"> </tr> <tr nowrap bgcolor="ececec" height="10" > <td width="21%" valign="middle" nowrap class="TdContentpro" style="padding-left:48px;"><font color="#333333">Content Management Page &nbsp;</font> <?php Category_Dropdown_id2(); ?> <td width="0%" colspan="-2" align="right">&nbsp;</td> <td width="79%"><!--<a href="event_categorylist.php" style="cursor:hand;" tabindex="1" class="green-but-link"> <h3>[&nbsp;Add&nbsp;/&nbsp;Edit Category&nbsp;]</h3> </a>--></td> <td colspan="3" valign="middle" nowrap style="padding-top:5px; padding-left:48px;" class="TdContentpro"> </td> </tr> </table></td> <tr> <td> <div id="myDiv"> </div> </td> </tr> <td colspan="3" align="center"><?php include("includes/bottom.php");?> </td> </tr> </table> </body> </html> This is the ajax code("fajax.php") <?php <?php function Category_Dropdown_id2() { ?> <select name="parent_id" class="select-txt" onChange="showCustomer(this.value)"> <option value="0">Select your category</option> <option value="PLUMBING"> PLUMBING</option> <option value="AIR CONDITIONING"> AIR CONDITIONING</option> <option value="FURNACES"> FURNACES</option> <option value="HOT WATER TANKS"> HOT WATER TANKS</option> <option value="HEATING"> HEATING</option> <option value="AIR PURIFICATION"> AIR PURIFICATION</option> <?php }?> </select> <?php function newsCategory_Dropdown_id($eid) { ?><select name="parent_id" class="select-txt" onChange="showCustomer(this.value)"> <option value="0">Main Category</option> <?php $sql011="select cat_id from newscategory where parent_id='0' ORDER BY cat_disorder ASC"; $result011=mysql_query($sql011); $c=0; while($rows011=mysql_fetch_array($result011)) { $zeroids[$c]=array($c); $zeroids[$c]=$rows011[0]; $c=$c+1; } $Level=0; foreach ($zeroids as $idval) { newscategory_treeview_display_edit($idval,$Level,$eid); }?> </select> <?php } ?> This is the ajax code(selectcustomer.js) var xmlHttp function showCustomer(str) { xmlHttp=GetXmlHttpObject(); xmlHttp1=GetXmlHttpObject1(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } var str1=escape(str); var url="contentarea.php"; url=url+"?q="+str1; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("myDiv").innerHTML=xmlHttp.responseText; } else if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading") { document.getElementById("myDiv").innerHTML="loading"; } }; xmlHttp.open("GET",url,true); xmlHttp.send(null); /*var url1="gallery.php?id="+str; xmlHttp1.onreadystatechange=stateChange; xmlHttp1.open("GET",url1,true); xmlHttp1.send(null);*/ } function currentpage(a) { xmlHttp=GetXmlHttpObject() var url="gallery.php" url=url+"?q="+a url=url+"&sid="+Math.random() //alert(url); xmlHttp.onreadystatechange=stateChanged if(document.frm.rpp.value==0) { alert("please select above 0 records") showall() } else { xmlHttp.open("get",url,true) } xmlHttp.send() } function getpage(a,b,c) { xmlHttp=GetXmlHttpObject() var url="gallery.php" url=url+"?q="+a url=url+"&rppage="+b url=url+"&page="+c url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("get",url,true) xmlHttp.send(null) } /*function stateChange() { if (xmlHttp1.readyState==4) { document.getElementById("txtHint1").innerHTML=xmlHttp1.responseText; } } */function stateChanged() { if (xmlHttp.readyState==4) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject1() { var xmlHttp1=null; try { // Firefox, Opera 8.0+, Safari xmlHttp1=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp1; } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } This is the code where i want the the instance of ck editor by using javascript(contentarea.php) <?php session_start(); require_once("checkuser.php"); checkuser(); require_once("includes/config.php"); require_once("includes/class/content.class.php"); $q=$_REQUEST['q']; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style.css"> <title>:: Edit User ::</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <style type="text/css"> <!-- .style1 {color: #999999} --> </style> </head> <body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0"> <?php $peo=new content(); $peo->getcontent($q); ?> <form name="frm" method="post" action="includes/function/contentfun.php?action=update&con=<? echo $q; ?>" enctype="multipart/form-data"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr><td colspan="3" align="center"></td> </tr> <tr> <td width="190" valign="top" height="100%">&nbsp;</td> <td width="100%" align="center" valign="top" style="padding-top:25px;"> <table width="76%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border"> <tr> <td align="left" valign="top" class="table-padding"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" background="images/grey_head.jpg"> <tr> <td width="93%" align="left" valign="middle" style="padding-left:8px;"><font color="#666666">Edit <font color="#666666"><?php echo $_GET['q'];?></font></font></td> <td width="4%" align="left" valign="middle"><a href="#" onClick="javascript:callhelp();"></a></td> <td width="3%" align="left" valign="middle">&nbsp;</td> </tr> </table></td> </tr> <tr> <td height="23" align="left" valign="top" class="table-padding2" > <table width="100%" height="23" border="0" cellpadding="0" cellspacing="0"> </table></td> </tr> <tr> <td align="center" valign="middle" class="alertMessage" height="23">&nbsp; </td> </tr> <tr> <td height="109" align="left" valign="top" class="mid-table-padding" style="padding-top:10px;"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-border"> <tr> <td height="57" align="left" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr align="left" valign="top" bgcolor="#ececec"> <td width="26%" height="190" align="Right" valign="middle" bgcolor="#F4F4F4" class="message" style="padding-left:22px;padding-right:10px;">Content</td> <td width="74%" bgcolor="#F4F4F4" style="padding-top:6px; padding-left:12px;"> <textarea name="content" cols="50" rows="10" class="box" id="editor2"><?php echo $peo->content;?> </textarea> </td> </tr> <tr align="left" valign="top" bgcolor="#ececec"> <td align="Right" valign="middle" bgcolor="#F4F4F4" class="message" style="padding-left:22px;">&nbsp;</td> <td bgcolor="#F4F4F4" style="padding-top:6px; padding-left:12px;">&nbsp;</td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="21" align="left" valign="top" class="table-padding"> <table width="100%" height="21" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="message" style="padding-left:10px;" valign="middle"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <td width="50%" valign="middle">&nbsp;</td> <td width="32%" valign="middle" align="right"><span class="style1">&nbsp;&nbsp;&nbsp;&nbsp;</span> </td> <td width="18%"><table width="10%" height="23" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="12%" align="left" valign="top"><img src="images/green_left.jpg" width="10" height="23" /></td> <td width="76%" align="center" valign="middle" nowrap="nowrap" background="images/green_bg.jpg"><input name="" value="Edit content" type="submit" class="green-but-link" ></td> <td width="12%" align="right" valign="top"><img src="images/green_right.jpg" width="10" height="23" /></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="message" style="padding-left:10px;" valign="middle">&nbsp;</td> </tr> <tr bgcolor="#f4f4f4"> <td class="message" style="padding-left:10px;" valign="middle">&nbsp; </td> </tr> </table></td> </tr> </table> <br></td> <td width="0%">&nbsp;</td> </tr> <tr> <td colspan="3" align="center">&nbsp;</td> </tr> </table> </form> <script type="text/javascript"> eval("CKEDITOR.replace( 'editor2');") </script> </body> </html> In the last page no javascript is executing like the <script type="text/javascript"> eval("CKEDITOR.replace( 'editor2');") </script> this one Thanks
php
javascript
ajax
null
null
02/05/2012 03:45:02
not a real question
Javascript functions are not executing in the contentarea.php === This the main page code <?php session_start(); require_once("checkuser.php"); checkuser(); require_once("includes/pagefunction.php"); require_once("includes/config.php"); require_once("fajax.php"); include("includes/Top.php"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>:: Project Page ::</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script language="JavaScript" src="selectcustomer.js"></script> </head> <script language="javascript"> </script> <body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td colspan="3" align="center" valign="top"> </td> </tr> <tr> <td width="190" valign="top" height="100%"><?php include("includes/Left.php");?> </td> <td width="100%" align="left" valign="top" style="padding-top:25px;"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border" height="250"> <tr> <td><table width="83%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border"> <tr nowrap > <td colspan="3" valign="middle" nowrap style="padding-top:20px; padding-left:48px;" class="alert9pxNormal" align="center"> </tr> <tr nowrap bgcolor="ececec" height="10" > <td width="21%" valign="middle" nowrap class="TdContentpro" style="padding-left:48px;"><font color="#333333">Content Management Page &nbsp;</font> <?php Category_Dropdown_id2(); ?> <td width="0%" colspan="-2" align="right">&nbsp;</td> <td width="79%"><!--<a href="event_categorylist.php" style="cursor:hand;" tabindex="1" class="green-but-link"> <h3>[&nbsp;Add&nbsp;/&nbsp;Edit Category&nbsp;]</h3> </a>--></td> <td colspan="3" valign="middle" nowrap style="padding-top:5px; padding-left:48px;" class="TdContentpro"> </td> </tr> </table></td> <tr> <td> <div id="myDiv"> </div> </td> </tr> <td colspan="3" align="center"><?php include("includes/bottom.php");?> </td> </tr> </table> </body> </html> This is the ajax code("fajax.php") <?php <?php function Category_Dropdown_id2() { ?> <select name="parent_id" class="select-txt" onChange="showCustomer(this.value)"> <option value="0">Select your category</option> <option value="PLUMBING"> PLUMBING</option> <option value="AIR CONDITIONING"> AIR CONDITIONING</option> <option value="FURNACES"> FURNACES</option> <option value="HOT WATER TANKS"> HOT WATER TANKS</option> <option value="HEATING"> HEATING</option> <option value="AIR PURIFICATION"> AIR PURIFICATION</option> <?php }?> </select> <?php function newsCategory_Dropdown_id($eid) { ?><select name="parent_id" class="select-txt" onChange="showCustomer(this.value)"> <option value="0">Main Category</option> <?php $sql011="select cat_id from newscategory where parent_id='0' ORDER BY cat_disorder ASC"; $result011=mysql_query($sql011); $c=0; while($rows011=mysql_fetch_array($result011)) { $zeroids[$c]=array($c); $zeroids[$c]=$rows011[0]; $c=$c+1; } $Level=0; foreach ($zeroids as $idval) { newscategory_treeview_display_edit($idval,$Level,$eid); }?> </select> <?php } ?> This is the ajax code(selectcustomer.js) var xmlHttp function showCustomer(str) { xmlHttp=GetXmlHttpObject(); xmlHttp1=GetXmlHttpObject1(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } var str1=escape(str); var url="contentarea.php"; url=url+"?q="+str1; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("myDiv").innerHTML=xmlHttp.responseText; } else if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading") { document.getElementById("myDiv").innerHTML="loading"; } }; xmlHttp.open("GET",url,true); xmlHttp.send(null); /*var url1="gallery.php?id="+str; xmlHttp1.onreadystatechange=stateChange; xmlHttp1.open("GET",url1,true); xmlHttp1.send(null);*/ } function currentpage(a) { xmlHttp=GetXmlHttpObject() var url="gallery.php" url=url+"?q="+a url=url+"&sid="+Math.random() //alert(url); xmlHttp.onreadystatechange=stateChanged if(document.frm.rpp.value==0) { alert("please select above 0 records") showall() } else { xmlHttp.open("get",url,true) } xmlHttp.send() } function getpage(a,b,c) { xmlHttp=GetXmlHttpObject() var url="gallery.php" url=url+"?q="+a url=url+"&rppage="+b url=url+"&page="+c url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("get",url,true) xmlHttp.send(null) } /*function stateChange() { if (xmlHttp1.readyState==4) { document.getElementById("txtHint1").innerHTML=xmlHttp1.responseText; } } */function stateChanged() { if (xmlHttp.readyState==4) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject1() { var xmlHttp1=null; try { // Firefox, Opera 8.0+, Safari xmlHttp1=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp1; } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } This is the code where i want the the instance of ck editor by using javascript(contentarea.php) <?php session_start(); require_once("checkuser.php"); checkuser(); require_once("includes/config.php"); require_once("includes/class/content.class.php"); $q=$_REQUEST['q']; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style.css"> <title>:: Edit User ::</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <style type="text/css"> <!-- .style1 {color: #999999} --> </style> </head> <body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0"> <?php $peo=new content(); $peo->getcontent($q); ?> <form name="frm" method="post" action="includes/function/contentfun.php?action=update&con=<? echo $q; ?>" enctype="multipart/form-data"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr><td colspan="3" align="center"></td> </tr> <tr> <td width="190" valign="top" height="100%">&nbsp;</td> <td width="100%" align="center" valign="top" style="padding-top:25px;"> <table width="76%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-border"> <tr> <td align="left" valign="top" class="table-padding"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" background="images/grey_head.jpg"> <tr> <td width="93%" align="left" valign="middle" style="padding-left:8px;"><font color="#666666">Edit <font color="#666666"><?php echo $_GET['q'];?></font></font></td> <td width="4%" align="left" valign="middle"><a href="#" onClick="javascript:callhelp();"></a></td> <td width="3%" align="left" valign="middle">&nbsp;</td> </tr> </table></td> </tr> <tr> <td height="23" align="left" valign="top" class="table-padding2" > <table width="100%" height="23" border="0" cellpadding="0" cellspacing="0"> </table></td> </tr> <tr> <td align="center" valign="middle" class="alertMessage" height="23">&nbsp; </td> </tr> <tr> <td height="109" align="left" valign="top" class="mid-table-padding" style="padding-top:10px;"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-border"> <tr> <td height="57" align="left" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr align="left" valign="top" bgcolor="#ececec"> <td width="26%" height="190" align="Right" valign="middle" bgcolor="#F4F4F4" class="message" style="padding-left:22px;padding-right:10px;">Content</td> <td width="74%" bgcolor="#F4F4F4" style="padding-top:6px; padding-left:12px;"> <textarea name="content" cols="50" rows="10" class="box" id="editor2"><?php echo $peo->content;?> </textarea> </td> </tr> <tr align="left" valign="top" bgcolor="#ececec"> <td align="Right" valign="middle" bgcolor="#F4F4F4" class="message" style="padding-left:22px;">&nbsp;</td> <td bgcolor="#F4F4F4" style="padding-top:6px; padding-left:12px;">&nbsp;</td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="21" align="left" valign="top" class="table-padding"> <table width="100%" height="21" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="message" style="padding-left:10px;" valign="middle"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <td width="50%" valign="middle">&nbsp;</td> <td width="32%" valign="middle" align="right"><span class="style1">&nbsp;&nbsp;&nbsp;&nbsp;</span> </td> <td width="18%"><table width="10%" height="23" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="12%" align="left" valign="top"><img src="images/green_left.jpg" width="10" height="23" /></td> <td width="76%" align="center" valign="middle" nowrap="nowrap" background="images/green_bg.jpg"><input name="" value="Edit content" type="submit" class="green-but-link" ></td> <td width="12%" align="right" valign="top"><img src="images/green_right.jpg" width="10" height="23" /></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="message" style="padding-left:10px;" valign="middle">&nbsp;</td> </tr> <tr bgcolor="#f4f4f4"> <td class="message" style="padding-left:10px;" valign="middle">&nbsp; </td> </tr> </table></td> </tr> </table> <br></td> <td width="0%">&nbsp;</td> </tr> <tr> <td colspan="3" align="center">&nbsp;</td> </tr> </table> </form> <script type="text/javascript"> eval("CKEDITOR.replace( 'editor2');") </script> </body> </html> In the last page no javascript is executing like the <script type="text/javascript"> eval("CKEDITOR.replace( 'editor2');") </script> this one Thanks
1
8,667,403
12/29/2011 11:39:56
238,232
12/24/2009 13:41:39
2,681
33
reading file : bad syntax (multiple expressions after identifier)
(define bootstrap-c-code (define (from-file file-name) (let* ((ip (open-input-file file-name)) (res (read-text-file-from-input-port ip))) (close-input-port ip) res)) (from-file "llvm.c")) Error : define: bad syntax (multiple expressions after identifier) But I can't see anything wrong with it. Can someone explain / fix it please.
scheme
racket
r5rs
null
null
null
open
reading file : bad syntax (multiple expressions after identifier) === (define bootstrap-c-code (define (from-file file-name) (let* ((ip (open-input-file file-name)) (res (read-text-file-from-input-port ip))) (close-input-port ip) res)) (from-file "llvm.c")) Error : define: bad syntax (multiple expressions after identifier) But I can't see anything wrong with it. Can someone explain / fix it please.
0
4,220,675
11/18/2010 23:20:33
458,704
09/26/2010 13:37:01
1
0
python facebook sdk post mp3 to wall
I'm running an offline script which posts to facebook using pyfacebook. Today, I ran it and found that checking permissions(hasAppPermission) and stream_publish were failing. This is code that was working last week(for the last few months actually). It seem that now I get "Error 102: Requires a valid user is specified (either via the session or via the API parameter for specifying the user." even though I still am specifying a user for both the permissions check and the stream_publish. Seems like something has changed on the facebook side. So I started experimenting with the new python sdk from facebook which uses the graph api. MY issue is that my posts contains an mp3 and the new graph API doesn't seem to have a way(yet) to do this. So it seems I can't use the old rest api by using pyfacebook and I can't post mp3's using the new graph api so what can I do or is there something I don't know about the new graph api that I'm missing and could solve my issue. Cheers, D
python
facebook
sdk
null
null
01/05/2012 00:35:57
too localized
python facebook sdk post mp3 to wall === I'm running an offline script which posts to facebook using pyfacebook. Today, I ran it and found that checking permissions(hasAppPermission) and stream_publish were failing. This is code that was working last week(for the last few months actually). It seem that now I get "Error 102: Requires a valid user is specified (either via the session or via the API parameter for specifying the user." even though I still am specifying a user for both the permissions check and the stream_publish. Seems like something has changed on the facebook side. So I started experimenting with the new python sdk from facebook which uses the graph api. MY issue is that my posts contains an mp3 and the new graph API doesn't seem to have a way(yet) to do this. So it seems I can't use the old rest api by using pyfacebook and I can't post mp3's using the new graph api so what can I do or is there something I don't know about the new graph api that I'm missing and could solve my issue. Cheers, D
3
8,239,727
11/23/2011 09:22:41
983,411
10/07/2011 05:30:03
49
4
Alert dialog closes without pressing the button and Activity goes to home page
I'm building an android app with a Login activity. If email is not valid, I want to show an alertbox with a "Email not valid" message and want to stay at same activity. The problem is that the alertbox is shown only for a brief time and then I go back immediately to the parent activity, without pressing any button in the alertbox. my code is: if (v.getId() == R.id.loginButton) { if(checkEmail(emailtheGame.toString())==true) { startActivity(new Intent(this, BackgroundImages.class)); } else { email=emailtheGame.toString(); showDialog(0); } finish(); boolean checkEmail(String inputMail) { Pattern pattern= Pattern.compile("^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\\.([a-zA-Z])+([a-zA-Z])+"); return pattern.matcher(inputMail).matches(); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case 0: return new AlertDialog.Builder(this) .setTitle("Showing Response.........") .setMessage("sdfdsfdfsdf") .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Toast.makeText(getBaseContext(), "OK clicked!", Toast.LENGTH_SHORT) .show(); } }) .create(); } return null; } Any help is highly appreciated......!!!
android
null
null
null
null
null
open
Alert dialog closes without pressing the button and Activity goes to home page === I'm building an android app with a Login activity. If email is not valid, I want to show an alertbox with a "Email not valid" message and want to stay at same activity. The problem is that the alertbox is shown only for a brief time and then I go back immediately to the parent activity, without pressing any button in the alertbox. my code is: if (v.getId() == R.id.loginButton) { if(checkEmail(emailtheGame.toString())==true) { startActivity(new Intent(this, BackgroundImages.class)); } else { email=emailtheGame.toString(); showDialog(0); } finish(); boolean checkEmail(String inputMail) { Pattern pattern= Pattern.compile("^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\\.([a-zA-Z])+([a-zA-Z])+"); return pattern.matcher(inputMail).matches(); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case 0: return new AlertDialog.Builder(this) .setTitle("Showing Response.........") .setMessage("sdfdsfdfsdf") .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Toast.makeText(getBaseContext(), "OK clicked!", Toast.LENGTH_SHORT) .show(); } }) .create(); } return null; } Any help is highly appreciated......!!!
0
7,338,393
09/07/2011 18:00:22
933,338
09/07/2011 18:00:22
1
0
Memcached: bytes_written vs bytes
Please help me in understanding the concept of bytes_written, bytes and limit_maxbytes. When I do stats on my memcache server, I get limit_maxbytes as 1GB. If I have to figure out if memcache memory is getting full, which value should I look - bytes or bytes_written? In my case, bytes is always less than limit_maxbytes where as bytes_written sometimes exceeds way above limit_maxbytes (goes up to 16GB sometimes). Is that a thing to concern about? Thanks in advance! Regards, Ashish
memcached
null
null
null
null
null
open
Memcached: bytes_written vs bytes === Please help me in understanding the concept of bytes_written, bytes and limit_maxbytes. When I do stats on my memcache server, I get limit_maxbytes as 1GB. If I have to figure out if memcache memory is getting full, which value should I look - bytes or bytes_written? In my case, bytes is always less than limit_maxbytes where as bytes_written sometimes exceeds way above limit_maxbytes (goes up to 16GB sometimes). Is that a thing to concern about? Thanks in advance! Regards, Ashish
0
9,738,976
03/16/2012 14:19:58
401,147
04/16/2010 00:27:33
1,115
5
php Yii framework job market?
I have used codeigniter for few of my projects in my portfolio and currently seeking a job opportunities. However, I heard yii is a very nice and high demanded php framework in the market now. Is that true? Should I turn my attention to yii or keep building more codeigniter projects in my portfolio for my first web developer job? Thanks for the help.
codeigniter
yii
php-frameworks
null
null
03/28/2012 13:44:10
off topic
php Yii framework job market? === I have used codeigniter for few of my projects in my portfolio and currently seeking a job opportunities. However, I heard yii is a very nice and high demanded php framework in the market now. Is that true? Should I turn my attention to yii or keep building more codeigniter projects in my portfolio for my first web developer job? Thanks for the help.
2
7,145,946
08/22/2011 10:16:23
905,668
08/22/2011 10:16:23
1
0
want to use exceptionpolicy.handleexception
Hi i am using silverlight4 and there on xaml backend i want to handle exception.i have implement the using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling; but still it saying that the class is not available for exception poilcy please suggest me
exception
handling
null
null
null
null
open
want to use exceptionpolicy.handleexception === Hi i am using silverlight4 and there on xaml backend i want to handle exception.i have implement the using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling; but still it saying that the class is not available for exception poilcy please suggest me
0
8,776,644
01/08/2012 09:51:50
401,403
07/25/2010 06:55:34
487
4
Getting Wrong Number Of Char Variable
in below code when i run it i get y=-124 and z=4294967172 can you explain me??(i tested that if x<128 there isnt any problem) char x=132; signed y=x; unsigned z=x; cout<<y<<endl; cout<<z<<endl; TIA
c++
char
null
null
null
null
open
Getting Wrong Number Of Char Variable === in below code when i run it i get y=-124 and z=4294967172 can you explain me??(i tested that if x<128 there isnt any problem) char x=132; signed y=x; unsigned z=x; cout<<y<<endl; cout<<z<<endl; TIA
0
3,448,800
08/10/2010 12:17:16
283,403
03/01/2010 05:27:05
22
0
BrainBench employment test
I have been asked by one of my potential employers to undertake a brainbench test for Boost (position is for C++ programmer). I have never heard/seen a brainbench test for Boost. Brainbench's website also doesn't have any hint. I was wondering perhaps it is some sort of customized solution for employers. My question, however is, what can I expect in this test. I am pretty good with some of Boost libraries but have no or very basic knowledge of others. Does it even make sense to test for the knowledge of a set of libraries such as boost itself?
c++
boost
brainbench
null
null
03/13/2012 11:28:51
off topic
BrainBench employment test === I have been asked by one of my potential employers to undertake a brainbench test for Boost (position is for C++ programmer). I have never heard/seen a brainbench test for Boost. Brainbench's website also doesn't have any hint. I was wondering perhaps it is some sort of customized solution for employers. My question, however is, what can I expect in this test. I am pretty good with some of Boost libraries but have no or very basic knowledge of others. Does it even make sense to test for the knowledge of a set of libraries such as boost itself?
2
8,930,196
01/19/2012 17:05:59
1,159,011
01/19/2012 16:54:46
1
0
PYTHON alternatin list from a txt file
:d I,m totally noob and I really need to do this C1. Reading the parent receives as parameter file name where it is stored in the matrix and stores this information in an object of the appropriate type, a ndarray list or, as preferred. C2. Reading the list of products. Receives as a parameter file is stored where the price list and saves this information on two objects of the appropriate type, lists or ndarrays as is preferred. ((A for names and one for the price.)) the TXT file product price product price ... please help me I will really really love you for that this is only a small part but it will help me infinitely
python
null
null
null
null
01/19/2012 23:49:25
not a real question
PYTHON alternatin list from a txt file === :d I,m totally noob and I really need to do this C1. Reading the parent receives as parameter file name where it is stored in the matrix and stores this information in an object of the appropriate type, a ndarray list or, as preferred. C2. Reading the list of products. Receives as a parameter file is stored where the price list and saves this information on two objects of the appropriate type, lists or ndarrays as is preferred. ((A for names and one for the price.)) the TXT file product price product price ... please help me I will really really love you for that this is only a small part but it will help me infinitely
1
10,438,412
05/03/2012 19:53:36
1,337,091
04/16/2012 19:16:53
1
0
What's the C# equivalent to this VB code?
Can anyone help me come up with a C# alternative to this VB code? for i = 1 to len(str) hex_str = hex_str + lcase(cstr(hex(asc(mid(str, i, 1))))) next
c#
asp.net
vb.net
null
null
05/03/2012 20:04:13
too localized
What's the C# equivalent to this VB code? === Can anyone help me come up with a C# alternative to this VB code? for i = 1 to len(str) hex_str = hex_str + lcase(cstr(hex(asc(mid(str, i, 1))))) next
3
10,780,312
05/28/2012 06:35:13
262,325
01/30/2010 04:38:58
1,105
3
check if an app work on jailbreak device
I have one free app and hope to inform the users to upgrade app when there is new version. But I need to detect if the app works on a jailbreak device. Is there a way to check if an app work on jailbreak device? I try to read the info of Info.plist, but failed. Welcome any comment
iphone
null
null
null
null
null
open
check if an app work on jailbreak device === I have one free app and hope to inform the users to upgrade app when there is new version. But I need to detect if the app works on a jailbreak device. Is there a way to check if an app work on jailbreak device? I try to read the info of Info.plist, but failed. Welcome any comment
0
4,944,034
02/09/2011 11:08:48
525,024
11/30/2010 10:38:12
1
0
HQL JoinTable not accessible
i have a many to many relationship between media and tags: Medium: @ManyToMany(fetch=FetchType.EAGER) @IndexColumn(name="tags_index_column") @JoinTable(name="tag_map", joinColumns={@JoinColumn(name="tag_id")}, inverseJoinColumns={@JoinColumn(name="item_id")}) private List<Tag> tags; Tags: @ManyToMany(mappedBy="tags") @JoinTable(name="tag_map", joinColumns={@JoinColumn(name="item_id")}, inverseJoinColumns={@JoinColumn(name="tag_id")}) private List<Medium> media; I try to query the join table from hql but i always get an exception: String resultQueryString = "From tag_map" Query resultQuery SessionFactory.getCurrentSession().createQuery(resultQueryString); Exception: org.springframework.orm.hibernate3.HibernateQueryException: tag_map is not mapped [From tag_map]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tag_map is not mapped [From tag_map] What i basically want to do is to query all media which has a tag with a specific id. Unfortunately i can't access the jointable. Any suggestions? :)
hibernate
query
hql
jointable
null
null
open
HQL JoinTable not accessible === i have a many to many relationship between media and tags: Medium: @ManyToMany(fetch=FetchType.EAGER) @IndexColumn(name="tags_index_column") @JoinTable(name="tag_map", joinColumns={@JoinColumn(name="tag_id")}, inverseJoinColumns={@JoinColumn(name="item_id")}) private List<Tag> tags; Tags: @ManyToMany(mappedBy="tags") @JoinTable(name="tag_map", joinColumns={@JoinColumn(name="item_id")}, inverseJoinColumns={@JoinColumn(name="tag_id")}) private List<Medium> media; I try to query the join table from hql but i always get an exception: String resultQueryString = "From tag_map" Query resultQuery SessionFactory.getCurrentSession().createQuery(resultQueryString); Exception: org.springframework.orm.hibernate3.HibernateQueryException: tag_map is not mapped [From tag_map]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: tag_map is not mapped [From tag_map] What i basically want to do is to query all media which has a tag with a specific id. Unfortunately i can't access the jointable. Any suggestions? :)
0
8,773,143
01/07/2012 21:10:03
1,058,232
11/21/2011 16:49:53
16
0
Cannot view windows network from Ubuntu 10.04 LTS Server
I have upgraded my works server to Ubuntu 10.04 server (and added the desktop gui) and I'm having some trouble... I've installed everything that I need (apache, php, mysql, samba) and then set up the firewall using UFW. I have opened up some ports to the local trusted computers within the range 10.0.0.0/24 Port 135/TCP Port 137/UDP Port 138/UDP Port 139/TCP Port 445/TCP Port 5353/Both Also modified UFW config file to include... The nf_contrack_netbios_ns has been added IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns" All computers on the network can see the web server and access the shared drives but... I have a old Iomega x200 NAS on the network that I was using successfully to back up important files to. The new set up cannot see the NAS or indeed the windows WORKGROUP on the network when the firewall is enabled. The moment the firewall its turned off, the WORKGROUP and the computers on the network are visible. If I mount the NAS with the firewall off and then turn the firewall back on once its mounted... I can still access the NAS but can no longer see WORKGROUP or any of its computers. Been messing with this for hours now, any help would be appreciated... Thanks in advance.
ubuntu
samba
iptables
nas
null
01/10/2012 03:03:05
off topic
Cannot view windows network from Ubuntu 10.04 LTS Server === I have upgraded my works server to Ubuntu 10.04 server (and added the desktop gui) and I'm having some trouble... I've installed everything that I need (apache, php, mysql, samba) and then set up the firewall using UFW. I have opened up some ports to the local trusted computers within the range 10.0.0.0/24 Port 135/TCP Port 137/UDP Port 138/UDP Port 139/TCP Port 445/TCP Port 5353/Both Also modified UFW config file to include... The nf_contrack_netbios_ns has been added IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns" All computers on the network can see the web server and access the shared drives but... I have a old Iomega x200 NAS on the network that I was using successfully to back up important files to. The new set up cannot see the NAS or indeed the windows WORKGROUP on the network when the firewall is enabled. The moment the firewall its turned off, the WORKGROUP and the computers on the network are visible. If I mount the NAS with the firewall off and then turn the firewall back on once its mounted... I can still access the NAS but can no longer see WORKGROUP or any of its computers. Been messing with this for hours now, any help would be appreciated... Thanks in advance.
2
10,631,772
05/17/2012 07:48:09
1,400,412
05/17/2012 07:46:44
1
0
please help me how to determine the status of Google + button?
please help me how to determine the status of Google + button? for example: if I click on the button and then google + it also will not show if I do not click +1 then it will display the please please show me how to do this
google
button
null
null
null
05/18/2012 11:02:41
not a real question
please help me how to determine the status of Google + button? === please help me how to determine the status of Google + button? for example: if I click on the button and then google + it also will not show if I do not click +1 then it will display the please please show me how to do this
1
120,851
09/23/2008 13:04:12
21,096
09/23/2008 13:00:50
1
0
How do I create a WPF Rounded Corner container?
We are creating an XBAP application that we need to have rounded corners in various locations in a single page and we would like to have a WPF Rounded Corner container to place a bunch of other elements within. Does anyone have some suggestions or sample code on how we can best accomplish this? Either with styles on a <Grid> or with creating a custom control?
wpf
corner
corners
rounded
null
null
open
How do I create a WPF Rounded Corner container? === We are creating an XBAP application that we need to have rounded corners in various locations in a single page and we would like to have a WPF Rounded Corner container to place a bunch of other elements within. Does anyone have some suggestions or sample code on how we can best accomplish this? Either with styles on a <Grid> or with creating a custom control?
0
3,696,900
09/12/2010 22:19:19
294,225
03/15/2010 19:11:46
1
0
What is a good open source beer database to contribute to and receive information from?
Anyone know a good open source directory to contribute to, or a place that gives access to brewing information openly so that one could be started? E.g. I'm sure a scrubber could be written that gets a lot of information to start with from the likes of beeradvocate.com but I'd prefer to start one legally or contribute to a directory thats open to others.
open-source
collaboration
brew
null
null
09/12/2010 22:54:40
off topic
What is a good open source beer database to contribute to and receive information from? === Anyone know a good open source directory to contribute to, or a place that gives access to brewing information openly so that one could be started? E.g. I'm sure a scrubber could be written that gets a lot of information to start with from the likes of beeradvocate.com but I'd prefer to start one legally or contribute to a directory thats open to others.
2
4,574,570
01/01/2011 15:48:35
298,661
03/21/2010 22:56:02
15,289
1,017
Pointer aliasing- in C++0x
I'm thinking about (just as an idea) disjointed pointer aliasing in C++0x. I was thinking about seeing if it could be implemented similarly to const correctness- that is, enforced by the compiler. What would be the requirements for such a thing? As this is more of a thought experiment, I'm perfectly happy to look at solutions that destroy legacy code or redefine half the language and that kind of thing. What I'd really rather not do is have, say, `restrict` from C99 where the programmer just promises it. It should be enforced.
c++0x
null
null
null
null
null
open
Pointer aliasing- in C++0x === I'm thinking about (just as an idea) disjointed pointer aliasing in C++0x. I was thinking about seeing if it could be implemented similarly to const correctness- that is, enforced by the compiler. What would be the requirements for such a thing? As this is more of a thought experiment, I'm perfectly happy to look at solutions that destroy legacy code or redefine half the language and that kind of thing. What I'd really rather not do is have, say, `restrict` from C99 where the programmer just promises it. It should be enforced.
0
636,183
03/11/2009 20:19:40
63,679
02/07/2009 15:09:26
224
8
Do you take advantage of video tutorials?
i just asked myself if there are people who learn from a Video Tutorial .. let's say a new programming language or something. Do you like to learn this way .. or is a good book better than a good video. Second question.. are there any Series of Video Tutorials in the english speaking community. As a German i like the [Video2Brain][1]-Series. [1]: http://www.video2brain.com/de/
video-tutorials
pro
null
null
null
09/05/2011 15:50:57
not constructive
Do you take advantage of video tutorials? === i just asked myself if there are people who learn from a Video Tutorial .. let's say a new programming language or something. Do you like to learn this way .. or is a good book better than a good video. Second question.. are there any Series of Video Tutorials in the english speaking community. As a German i like the [Video2Brain][1]-Series. [1]: http://www.video2brain.com/de/
4
11,382,703
07/08/2012 11:16:52
10,980
09/16/2008 03:40:08
597
23
Process.startInfo.WorkingDirectory is not working in WPF application
I am trying to run various commands from a WPF application.<br /> I am trying as follows: <br /> <pre><code> var p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = cmd; p.StartInfo.Arguments = arguments; p.StartInfo.WorkingDirectory = dir; p.StartInfo.CreateNoWindow = true; p.Start(); </code></pre> However this doesn't work when I run this code from a WPF application.<br /> Same code works when I run from a console application. Note: I have also tried adding the directory to the path variable of the new process.
c#
wpf
null
null
null
null
open
Process.startInfo.WorkingDirectory is not working in WPF application === I am trying to run various commands from a WPF application.<br /> I am trying as follows: <br /> <pre><code> var p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = cmd; p.StartInfo.Arguments = arguments; p.StartInfo.WorkingDirectory = dir; p.StartInfo.CreateNoWindow = true; p.Start(); </code></pre> However this doesn't work when I run this code from a WPF application.<br /> Same code works when I run from a console application. Note: I have also tried adding the directory to the path variable of the new process.
0
5,257,936
03/10/2011 09:52:44
392,390
07/15/2010 07:06:52
230
10
how to get the result of mysql match against in form of percentage?
I am using <b>Match (Col1) Against (Val)</b> in mysql. <pre> select match(body) against(body_var) from articles; </pre> now in case of completely match i am getting result as a number (for example 14.43). what does this number mean? and the main question is <b>can i get the result in percentage form (for example 0.94)</b> thanks for your help
mysql
match
against
null
null
null
open
how to get the result of mysql match against in form of percentage? === I am using <b>Match (Col1) Against (Val)</b> in mysql. <pre> select match(body) against(body_var) from articles; </pre> now in case of completely match i am getting result as a number (for example 14.43). what does this number mean? and the main question is <b>can i get the result in percentage form (for example 0.94)</b> thanks for your help
0
5,632,954
04/12/2011 09:18:39
703,387
04/12/2011 05:17:49
1
0
Compare two html files
I want to compare code of two HTML files. How do I achieve this?
html
null
null
null
null
04/12/2011 16:22:27
off topic
Compare two html files === I want to compare code of two HTML files. How do I achieve this?
2
6,437,518
06/22/2011 09:12:54
808,907
06/21/2011 16:59:59
3
0
Breadcrumb problem in Expression Engine
I am having a small issue in expression engine, I have created a breadcrumb snippet. I have created it using {if segment_} coding. So I created an if rule for each of the pages (it's not a huge site) however I am having a problem with one of the breadcrumb trials. I have numerous categories with a product view page, on this product view page I can't seem to place the category in the breadcrumb. Placing the category in the actual category page is no problem, i've used: {if segment_4 == "toys"}<li><a href="index.php/product/category/toys">Toys</a></li>{/if} However on the permalink page I can't do this as there are no toys in the url. I know this is an easy fix, i'm just not very familiar with categories on expression engine.
php
html
expressionengine
breadcrumbs
null
null
open
Breadcrumb problem in Expression Engine === I am having a small issue in expression engine, I have created a breadcrumb snippet. I have created it using {if segment_} coding. So I created an if rule for each of the pages (it's not a huge site) however I am having a problem with one of the breadcrumb trials. I have numerous categories with a product view page, on this product view page I can't seem to place the category in the breadcrumb. Placing the category in the actual category page is no problem, i've used: {if segment_4 == "toys"}<li><a href="index.php/product/category/toys">Toys</a></li>{/if} However on the permalink page I can't do this as there are no toys in the url. I know this is an easy fix, i'm just not very familiar with categories on expression engine.
0
1,960,177
12/25/2009 00:46:10
188,661
10/12/2009 20:43:21
54
1
Help with qt4 qgraphicsview
I've done lots of stuff with pygtk however i'm deciding to learn pyqt, im stuck at the qgraphicsview i have absolutley no idea how to get signals from the items i place on the graphics view, primarily mouse events.How do i get the mouse events from idividual items in a scene?
pyqt
qt4
signals
events
null
null
open
Help with qt4 qgraphicsview === I've done lots of stuff with pygtk however i'm deciding to learn pyqt, im stuck at the qgraphicsview i have absolutley no idea how to get signals from the items i place on the graphics view, primarily mouse events.How do i get the mouse events from idividual items in a scene?
0
11,102,287
06/19/2012 13:43:29
1,466,568
06/19/2012 13:26:50
1
0
use images as text
My boss wants to create his own custom font using Photoshop, paint, or illustrator. He wants each letter to be multicolored or change colors and possibly have shadowing and wants to use this in his web site so that when people enter text it is not the simple black and white text you normally see. I have researched and know that you can create custom fonts with a font creator, but is it possible using code (java script or php) to insert the individual letter/symbol image into the text box. If so does anyone have a possible example or a site that you know does this. All help would be much appreciated.
php
javascript
html
html5
photoshop
06/28/2012 11:02:01
not a real question
use images as text === My boss wants to create his own custom font using Photoshop, paint, or illustrator. He wants each letter to be multicolored or change colors and possibly have shadowing and wants to use this in his web site so that when people enter text it is not the simple black and white text you normally see. I have researched and know that you can create custom fonts with a font creator, but is it possible using code (java script or php) to insert the individual letter/symbol image into the text box. If so does anyone have a possible example or a site that you know does this. All help would be much appreciated.
1
411,103
01/04/2009 15:02:59
44,673
12/09/2008 17:17:54
165
7
Function with same name but different signature in derived class
I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code: class A { public: void foo(string s){}; }; class B : public A { public: int foo(int i){}; }; class C : public B { public: void bar() { string s; foo(s); } }; I receive the following error from the gcc compiler: In member function `void C::bar()': no matching function for call to `C::foo(std::string&)' candidates are: int B::foo(int) If I remove int foo(int i){}; from class B, or if I rename it to foo1, everything works fine. What's the problem with this? Thank you.
c++
inheritance
null
null
null
null
open
Function with same name but different signature in derived class === I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code: class A { public: void foo(string s){}; }; class B : public A { public: int foo(int i){}; }; class C : public B { public: void bar() { string s; foo(s); } }; I receive the following error from the gcc compiler: In member function `void C::bar()': no matching function for call to `C::foo(std::string&)' candidates are: int B::foo(int) If I remove int foo(int i){}; from class B, or if I rename it to foo1, everything works fine. What's the problem with this? Thank you.
0
11,635,670
07/24/2012 16:54:47
1,549,336
07/24/2012 16:26:04
1
0
OpenXML - extracting text and formatting from a docx (MS Office *2010*)
What is the best tool for extracting text and inline tags (bold, italic, and so on) from a 2010 docx if the objective is to be able to transform the open XML into a less complex one? An idea that comes to mind is to convert the docx to another format. If so, which format would you suggest and on which program (preferably open source)? Any other ideas (that is, different approaches)? Many tools seem to still be done for MSOffice 2007. Is namely Xpath, XQuery and XSLT the way to go, and if so ***why***? Please be patient. I'm a beginner on this and I would also gladly welcome indications about preferably concise sources of knowledge. xlixol
xml
extract
openxml
docx
office-2010
null
open
OpenXML - extracting text and formatting from a docx (MS Office *2010*) === What is the best tool for extracting text and inline tags (bold, italic, and so on) from a 2010 docx if the objective is to be able to transform the open XML into a less complex one? An idea that comes to mind is to convert the docx to another format. If so, which format would you suggest and on which program (preferably open source)? Any other ideas (that is, different approaches)? Many tools seem to still be done for MSOffice 2007. Is namely Xpath, XQuery and XSLT the way to go, and if so ***why***? Please be patient. I'm a beginner on this and I would also gladly welcome indications about preferably concise sources of knowledge. xlixol
0
5,342,515
03/17/2011 17:01:02
42,897
12/03/2008 16:40:42
929
15
How to correctly handle errors in PHP via phplint
I'm very new to PHP. I have a line of code on a server side script that opens a file: `$fh = fopen($myFile, 'r');` When I run this code through phplint, it gives me the notice: $fh = fopen($myFile, 'r'); \_ HERE ==== 19: notice: unhandled error(s): E_WARNING I tried creating an error handler earlier and specifically setting it to handle `E_WARNING` like this: `set_error_handler("errorHandler", E_WARNING);` But I get the same notice. I'd like to do this correctly. Is there some other mechanism to handle this error that `phplint` thinks is correct?
php
error-handling
null
null
null
null
open
How to correctly handle errors in PHP via phplint === I'm very new to PHP. I have a line of code on a server side script that opens a file: `$fh = fopen($myFile, 'r');` When I run this code through phplint, it gives me the notice: $fh = fopen($myFile, 'r'); \_ HERE ==== 19: notice: unhandled error(s): E_WARNING I tried creating an error handler earlier and specifically setting it to handle `E_WARNING` like this: `set_error_handler("errorHandler", E_WARNING);` But I get the same notice. I'd like to do this correctly. Is there some other mechanism to handle this error that `phplint` thinks is correct?
0
5,089,704
02/23/2011 10:35:03
586,557
01/23/2011 18:04:36
18
0
skin detection in the YUV color space?
can i perform skin detection using a set of rules (things like x1 < Y < x2 )
image-processing
yuv
null
null
null
null
open
skin detection in the YUV color space? === can i perform skin detection using a set of rules (things like x1 < Y < x2 )
0
11,092,161
06/18/2012 22:45:16
1,291,859
03/25/2012 21:56:45
1
1
Javascript source won't load
I want to place a javascript code in my blog but it wont load in firebug after loading page!! here is the code: <script type="text/javascript" src="http://www.mihanstore.net/partner/show_ads.php?ads_type=banner&ref=1&row=1&col=1&class=1" ></script> my browser javascript is enabled. I don't know what's wrong?!?
javascript
null
null
null
null
06/18/2012 23:03:32
not a real question
Javascript source won't load === I want to place a javascript code in my blog but it wont load in firebug after loading page!! here is the code: <script type="text/javascript" src="http://www.mihanstore.net/partner/show_ads.php?ads_type=banner&ref=1&row=1&col=1&class=1" ></script> my browser javascript is enabled. I don't know what's wrong?!?
1
10,804,579
05/29/2012 18:23:09
669,448
03/21/2011 12:49:27
595
21
jQuery.get method is not working as expected
I have an array in javascript method. I want to access that on a separate php file. I am trying jQuery.get method. Here is the code: <script> function Quantity(){ var count = document.getElementById('hidden').value; alert(count); var Quantity=new Array(); var i=0; for(i=0; i<count; i++) { Quantity[i]=document.getElementById(i).value; } document.getElementById('hdnQuantityArray').value = Quantity; jQuery.get("CalculateTotal.php", Quantity); return false; } </script> I am using a hidden field `hdnQuantityArray` to send this array through GET. The problem is, this code is not redirecting me to the file `CalculateTotal.php`. Instead it remains on the same page with the URL containing hidden field's value. Please guide me if I am doing something wrong here. Suggest me an alternate otherwise.
php
javascript
jquery
html
client-server
05/29/2012 18:30:50
not a real question
jQuery.get method is not working as expected === I have an array in javascript method. I want to access that on a separate php file. I am trying jQuery.get method. Here is the code: <script> function Quantity(){ var count = document.getElementById('hidden').value; alert(count); var Quantity=new Array(); var i=0; for(i=0; i<count; i++) { Quantity[i]=document.getElementById(i).value; } document.getElementById('hdnQuantityArray').value = Quantity; jQuery.get("CalculateTotal.php", Quantity); return false; } </script> I am using a hidden field `hdnQuantityArray` to send this array through GET. The problem is, this code is not redirecting me to the file `CalculateTotal.php`. Instead it remains on the same page with the URL containing hidden field's value. Please guide me if I am doing something wrong here. Suggest me an alternate otherwise.
1
7,126,641
08/19/2011 19:47:57
688,080
04/01/2011 18:20:07
132
0
Stacked unicode characters
ส็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็ ส้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้ Just copy and paste. And I can see two (probably) Thai letters with bunches of other two letters piled above in my Chrome. I've tried to paste them in my UltraEdit, only to see the BOM "EF BB BF", probably the letter "E0 B8 AA", a series of "E0 B9 87", and then the space "20", the letter "E0 B8 AA" again, and a series of "E0 B9 89". I don't understand the mechanism here. If there does exist characters controlling such "tilted ladder", what is the point of doing so? Thanks for the references :)
unicode
null
null
null
null
08/19/2011 19:51:06
not a real question
Stacked unicode characters === ส็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็ ส้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้ Just copy and paste. And I can see two (probably) Thai letters with bunches of other two letters piled above in my Chrome. I've tried to paste them in my UltraEdit, only to see the BOM "EF BB BF", probably the letter "E0 B8 AA", a series of "E0 B9 87", and then the space "20", the letter "E0 B8 AA" again, and a series of "E0 B9 89". I don't understand the mechanism here. If there does exist characters controlling such "tilted ladder", what is the point of doing so? Thanks for the references :)
1
10,481,889
05/07/2012 12:14:00
1,093,100
12/12/2011 04:57:57
101
10
how to stop automatically check on check box
I create a list-view. List-view contain both text-view and check-box so when i click on check-box and scroll down automatically one more check-box is check so please provide me the solution its urgent and helper must provide reward..
android
null
null
null
null
05/09/2012 11:50:29
not a real question
how to stop automatically check on check box === I create a list-view. List-view contain both text-view and check-box so when i click on check-box and scroll down automatically one more check-box is check so please provide me the solution its urgent and helper must provide reward..
1
11,269,242
06/29/2012 21:31:50
351,080
03/04/2010 15:37:46
1
0
Rosetta Code License: Can I modify a sample code and license it under MIT license?
I made a Huffman Code implementation based on an example from Rosetta Code ([http://rosettacode.org/wiki/Huffman_coding#Java][1]). The piece of code don't explicit the author neither if it has a specific license, so it must be licensed under GNU Free Documentation License. My app will be open source licensed under MIT License. The Huffman Code is just a small portion of the code, it's not the main goal. My understanding of FDL says that I have to launch my app in FDL because I modified the code, but it's not a license with code in its focus, so I would not like to license under FDL. So, do I have to license all my app under FDL or I can keep it under MIT? [1]: http://rosettacode.org/wiki/Huffman_coding#Java
licensing
mit-license
rosetta-code
null
null
07/02/2012 02:29:52
off topic
Rosetta Code License: Can I modify a sample code and license it under MIT license? === I made a Huffman Code implementation based on an example from Rosetta Code ([http://rosettacode.org/wiki/Huffman_coding#Java][1]). The piece of code don't explicit the author neither if it has a specific license, so it must be licensed under GNU Free Documentation License. My app will be open source licensed under MIT License. The Huffman Code is just a small portion of the code, it's not the main goal. My understanding of FDL says that I have to launch my app in FDL because I modified the code, but it's not a license with code in its focus, so I would not like to license under FDL. So, do I have to license all my app under FDL or I can keep it under MIT? [1]: http://rosettacode.org/wiki/Huffman_coding#Java
2
6,231,353
06/03/2011 18:47:27
548,852
12/20/2010 16:00:31
109
4
Android query selection difference
Using query for my database searching for rows with a specific `number`, I notice that for the selection argument if I use: String selection = NUMBER + " MATCH ?" String selectionArgs = new String[]{number} Cursor cursor1 = db.query(TABLE_NAME, null, selection, selectionArgs, null, null, null); cursor1.moveToFirst(); this causes an error, where as if I use: String selection = NUMBER + " = " + number; Cursor cursor2 = db. query(TABLE_NAME, null, selection, null, null, null, null); cursor2.moveToFirst(); this works fine with no problems. So what's the difference?
android
sqlite
null
null
null
null
open
Android query selection difference === Using query for my database searching for rows with a specific `number`, I notice that for the selection argument if I use: String selection = NUMBER + " MATCH ?" String selectionArgs = new String[]{number} Cursor cursor1 = db.query(TABLE_NAME, null, selection, selectionArgs, null, null, null); cursor1.moveToFirst(); this causes an error, where as if I use: String selection = NUMBER + " = " + number; Cursor cursor2 = db. query(TABLE_NAME, null, selection, null, null, null, null); cursor2.moveToFirst(); this works fine with no problems. So what's the difference?
0
9,303,813
02/16/2012 00:29:41
1,189,402
02/04/2012 13:44:31
10
1
What is the best PHP hash encryption algorithm to date?
I have tried google and read quite a lot of crap regarding the subject and now i am trying to get some good advice about this. i know about salting, using a key etc. Thanks in advance!
php
mysql
encryption
null
null
02/16/2012 00:40:41
not a real question
What is the best PHP hash encryption algorithm to date? === I have tried google and read quite a lot of crap regarding the subject and now i am trying to get some good advice about this. i know about salting, using a key etc. Thanks in advance!
1