question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
6,189,350
6,189,603
Getting accurate time from FFMPeg with Objective C (Audio Queue Services)
My iPhone app plays an audio file using FFMPeg. I'm getting the elapsed time (to show to user) from the playing audio (in minutes and seconds after converting from microseconds, given by FFMPeg) like so: AudioTimeStamp currentTimeStamp; AudioQueueGetCurrentTime (audioQueue, NULL, &currentTimeStamp, NULL); getFFMPEGtim...
If you're doing this to show elapsed time in the media to the user (which the fact you're turning it into a formatted string suggests), then you should instead query the playback system you're using for the time it thinks it is at in the file. The audio queue is completely unaware of your media so you'll have to duplic...
Getting accurate time from FFMPeg with Objective C (Audio Queue Services) My iPhone app plays an audio file using FFMPeg. I'm getting the elapsed time (to show to user) from the playing audio (in minutes and seconds after converting from microseconds, given by FFMPeg) like so: AudioTimeStamp currentTimeStamp; AudioQueu...
TITLE: Getting accurate time from FFMPeg with Objective C (Audio Queue Services) QUESTION: My iPhone app plays an audio file using FFMPeg. I'm getting the elapsed time (to show to user) from the playing audio (in minutes and seconds after converting from microseconds, given by FFMPeg) like so: AudioTimeStamp currentTi...
[ "iphone", "objective-c", "math", "ffmpeg", "audioqueueservices" ]
1
2
951
1
0
2011-05-31T14:45:02.823000
2011-05-31T15:03:39.353000
6,189,353
6,189,492
Debugging Websites with Google Chrome
When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option. With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio doesn't recognize when I've closed the browser. I must the...
When you debug a web application, Visual Studio simply attaches itself to the IIS process (or the development server process, if you're using that), and starts the browser with the correct URL. The browser doesn't even know you're debugging. With IE, Visual Studio performs some additional inter-process voodoo to detect...
Debugging Websites with Google Chrome When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option. With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio doesn't recognize wh...
TITLE: Debugging Websites with Google Chrome QUESTION: When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option. With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio do...
[ "asp.net", "asp.net-mvc", "visual-studio", "debugging", "google-chrome" ]
0
1
9,470
3
0
2011-05-31T14:45:18.733000
2011-05-31T14:55:25.177000
6,189,354
6,190,770
MBProgressHUD in UISplitViewController
I have a MBProgressHUD that is shown in the detailViewController of the UISplitViewApplication. It initially worked just fine when you start in either orientation. But once I change the orientation from landscape to portrait or vice versa, the view gets very messy. The code I did was: HUD = [[MBProgressHUD alloc] initW...
I was able to resolve this by release-allocating the HUD when an orientation change. My issue is that the layout of the HUD in a split view controller is not correct. The black background and the indicator is separated when you switch views. So this is how I solve it.
MBProgressHUD in UISplitViewController I have a MBProgressHUD that is shown in the detailViewController of the UISplitViewApplication. It initially worked just fine when you start in either orientation. But once I change the orientation from landscape to portrait or vice versa, the view gets very messy. The code I did ...
TITLE: MBProgressHUD in UISplitViewController QUESTION: I have a MBProgressHUD that is shown in the detailViewController of the UISplitViewApplication. It initially worked just fine when you start in either orientation. But once I change the orientation from landscape to portrait or vice versa, the view gets very mess...
[ "iphone", "objective-c", "ipad" ]
1
0
1,279
4
0
2011-05-31T14:45:22.533000
2011-05-31T16:42:22.320000
6,189,378
6,190,004
java library to maintain database structure
My application is always developing, so occasionally - when the version upgrades - some tables need to be created/altered/deleted, some data modified, etc. Generally some sql code needs to be executed. Is there a Java library that can be used to keep my database structure up to date (by analyzing something like " db st...
Try DBDeploy. Although I haven't used it in the past, it sounds like this project would help in your case. DBDeploy is a database refactoring manager that: "Automates the process of establishing which database refactorings need to be run against a specific database in order to migrate it to a particular build." It is k...
java library to maintain database structure My application is always developing, so occasionally - when the version upgrades - some tables need to be created/altered/deleted, some data modified, etc. Generally some sql code needs to be executed. Is there a Java library that can be used to keep my database structure up ...
TITLE: java library to maintain database structure QUESTION: My application is always developing, so occasionally - when the version upgrades - some tables need to be created/altered/deleted, some data modified, etc. Generally some sql code needs to be executed. Is there a Java library that can be used to keep my data...
[ "java", "sql", "database", "structure" ]
10
3
2,755
6
0
2011-05-31T14:47:48.343000
2011-05-31T15:35:34.470000
6,189,387
6,189,520
RAD Studio XE 2010 : Graphics32 compilation problem
I'm trying to install Graphics32 to my freshly installed Embarcadero RAD Studio XE. I just open GR32_DSGN_RS2010.bpl and I try to compile it. I get this error: [DCC Erreur] GR32.inc(172): E2029 Déclaration attendu(e) mais constante chaîne trouvé(e) Which means [DCC Erreur] GR32.inc(172): E2029 Declaration expected but ...
I think the current 1.9 release doesn't correctly support XE. Ther error you see is probably because the.INC file fails to detect the new compiler version. I found this upload on sourceforge, which has 'compatibility fixes' for Graphics32 on XE. I have got adapted GR32 for Delphi XE. There is compatibility changes. As ...
RAD Studio XE 2010 : Graphics32 compilation problem I'm trying to install Graphics32 to my freshly installed Embarcadero RAD Studio XE. I just open GR32_DSGN_RS2010.bpl and I try to compile it. I get this error: [DCC Erreur] GR32.inc(172): E2029 Déclaration attendu(e) mais constante chaîne trouvé(e) Which means [DCC Er...
TITLE: RAD Studio XE 2010 : Graphics32 compilation problem QUESTION: I'm trying to install Graphics32 to my freshly installed Embarcadero RAD Studio XE. I just open GR32_DSGN_RS2010.bpl and I try to compile it. I get this error: [DCC Erreur] GR32.inc(172): E2029 Déclaration attendu(e) mais constante chaîne trouvé(e) W...
[ "delphi", "installation", "delphi-xe" ]
2
4
1,976
3
0
2011-05-31T14:48:37.360000
2011-05-31T14:57:22.523000
6,189,399
6,189,466
C# - Example of Extension Method
Please could someone provide me with a simple extension method that for example squares a number. I have drawn up so pseudo code: class Program int = x --------------------- public static int square (this int x) return x * square
public static class NumberExtensions { public static int Square(this int n) { return n*n; } } Now you can say: int number=5.Square();
C# - Example of Extension Method Please could someone provide me with a simple extension method that for example squares a number. I have drawn up so pseudo code: class Program int = x --------------------- public static int square (this int x) return x * square
TITLE: C# - Example of Extension Method QUESTION: Please could someone provide me with a simple extension method that for example squares a number. I have drawn up so pseudo code: class Program int = x --------------------- public static int square (this int x) return x * square ANSWER: public static class NumberE...
[ "c#", "linq", "methods" ]
2
4
1,994
5
0
2011-05-31T14:49:15.197000
2011-05-31T14:53:43.850000
6,189,404
6,189,433
How to use compiler #warning in my code?
I am writing a larger project and am trying to make a deprecated method "print" a #warning about the deprecation when the method is called. How could I do so? Just again: I have this #warning -methodname:(id)sender is deprecated, use... I only want this message appear in the build warnings, if the message is called, no...
Place this after the declaration of the method, before the semicolon: __attribute__((__deprecated__))
How to use compiler #warning in my code? I am writing a larger project and am trying to make a deprecated method "print" a #warning about the deprecation when the method is called. How could I do so? Just again: I have this #warning -methodname:(id)sender is deprecated, use... I only want this message appear in the bui...
TITLE: How to use compiler #warning in my code? QUESTION: I am writing a larger project and am trying to make a deprecated method "print" a #warning about the deprecation when the method is called. How could I do so? Just again: I have this #warning -methodname:(id)sender is deprecated, use... I only want this message...
[ "iphone", "xcode", "ios", "gcc", "warnings" ]
1
1
121
1
0
2011-05-31T14:49:30.807000
2011-05-31T14:51:12.510000
6,189,406
6,189,627
passing a parameter to a JavaScript function
int i = Convert.ToInt32(Session["sayfaTuru"]); ClientScript.RegisterStartupScript(this.GetType(), "RefreshOpener", "f2(" + i + ")", true); function f2(i) { if (i == 1) {//CariKartHareketleri opener.document.getElementById("HiddenField1").value = "hello world"; window.opener.location.href = window.opener.location.href; ...
Have you tried debugging the server-side code to see if int i = Convert.ToInt32(Session["sayfaTuru"]); is giving you what you want in the first place? Well seeing as how the above has been checked, I went ahead and created my own test, and it worked just fine. Here's the test I used: JS: C#: Session["sayfaTuru"] = 2; /...
passing a parameter to a JavaScript function int i = Convert.ToInt32(Session["sayfaTuru"]); ClientScript.RegisterStartupScript(this.GetType(), "RefreshOpener", "f2(" + i + ")", true); function f2(i) { if (i == 1) {//CariKartHareketleri opener.document.getElementById("HiddenField1").value = "hello world"; window.opener....
TITLE: passing a parameter to a JavaScript function QUESTION: int i = Convert.ToInt32(Session["sayfaTuru"]); ClientScript.RegisterStartupScript(this.GetType(), "RefreshOpener", "f2(" + i + ")", true); function f2(i) { if (i == 1) {//CariKartHareketleri opener.document.getElementById("HiddenField1").value = "hello worl...
[ "javascript" ]
1
2
2,796
3
0
2011-05-31T14:49:38.313000
2011-05-31T15:06:08.780000
6,189,409
6,197,348
How to get Bytes from CMSampleBufferRef , To Send Over Network
Am Captuing video using AVFoundation frame work.With the help of Apple Documentation http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html%23//apple_ref/doc/uid/TP40010188-CH5-SW2 Now i did Following things 1.Created videoCaptureDevice 2.Created AVCaptu...
Here is code to get at the buffer. This code assumes a flat image (e.g. BGRA). NSData* imageToBuffer( CMSampleBufferRef source) { CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(source); CVPixelBufferLockBaseAddress(imageBuffer,0); size_t bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer); size_t width...
How to get Bytes from CMSampleBufferRef , To Send Over Network Am Captuing video using AVFoundation frame work.With the help of Apple Documentation http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html%23//apple_ref/doc/uid/TP40010188-CH5-SW2 Now i did ...
TITLE: How to get Bytes from CMSampleBufferRef , To Send Over Network QUESTION: Am Captuing video using AVFoundation frame work.With the help of Apple Documentation http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html%23//apple_ref/doc/uid/TP40010188-...
[ "ios", "video-capture", "avfoundation", "video-processing", "core-video" ]
29
38
27,653
2
0
2011-05-31T14:49:59.323000
2011-06-01T06:54:04.303000
6,189,411
6,233,130
Is there a way to tell HtmlUnit to grab all the dependancies
I'm using HtmlUnit for web testing and it is great. But I also want to test the download time for the total page including linked images, javascript and CSS pages as well as ensure the links are valid. Is there a way to tell HtmlUnit to grab all the dependancies for any given html page?
I don't know of anything as part of HtmlUnit itself, but it's not hard to do yourself. Pull out all the dependent links yourself — e.g. use getByXPath() to retrieve all the tags — and iterate through them and have HtmlUnit pull each down individually. Just be careful using this to determine download times: unless you e...
Is there a way to tell HtmlUnit to grab all the dependancies I'm using HtmlUnit for web testing and it is great. But I also want to test the download time for the total page including linked images, javascript and CSS pages as well as ensure the links are valid. Is there a way to tell HtmlUnit to grab all the dependanc...
TITLE: Is there a way to tell HtmlUnit to grab all the dependancies QUESTION: I'm using HtmlUnit for web testing and it is great. But I also want to test the download time for the total page including linked images, javascript and CSS pages as well as ensure the links are valid. Is there a way to tell HtmlUnit to grab...
[ "integration-testing", "htmlunit" ]
0
0
134
1
0
2011-05-31T14:50:04.800000
2011-06-03T22:05:55.237000
6,189,413
6,197,531
Context Menu in NSTextView
I am using NSTextView for the user to type their response. I have turned on continuous spell check and the incorrect words have a red line under them. I have a shared SpellChecker which I am using. But I want the user to do a right click and correct the spelling. I have the following questions - In Text edit, as soon a...
For point 1) NSTextView.SelectedRange returns the first selected range. If no text is selected the range's length is 0 and the range's location is the index of the character where the cursor lies. Then, get a reference to the string context ( NSTextView.TextStorage.String ) and search for whitespace before and after th...
Context Menu in NSTextView I am using NSTextView for the user to type their response. I have turned on continuous spell check and the incorrect words have a red line under them. I have a shared SpellChecker which I am using. But I want the user to do a right click and correct the spelling. I have the following question...
TITLE: Context Menu in NSTextView QUESTION: I am using NSTextView for the user to type their response. I have turned on continuous spell check and the incorrect words have a red line under them. I have a shared SpellChecker which I am using. But I want the user to do a right click and correct the spelling. I have the ...
[ "objective-c", "cocoa", "mono", "monobjc" ]
1
3
1,156
1
0
2011-05-31T14:50:09.077000
2011-06-01T07:13:01.483000
6,189,417
6,189,476
PHP File upload form not working
I've used this code in another site I've made and it works absolutely fine so I'm really confused as to why this isn't working properly. The only things I have changed are the directories for the file to be moved to, but the files never get uploaded. I've triple checked everything and it all seems fine. The code all ex...
Looks like you are missing an else statement possibly, the code formatting is off and causes confusion: if (file_exists("images/news/". $_FILES["filetoupload"]["name"])) { echo $_FILES["filetoupload"]["name"]. " already exists. "; }else { move_uploaded_file($_FILES["filetoupload"]["tmp_name"], "images/news/". $_FILES["...
PHP File upload form not working I've used this code in another site I've made and it works absolutely fine so I'm really confused as to why this isn't working properly. The only things I have changed are the directories for the file to be moved to, but the files never get uploaded. I've triple checked everything and i...
TITLE: PHP File upload form not working QUESTION: I've used this code in another site I've made and it works absolutely fine so I'm really confused as to why this isn't working properly. The only things I have changed are the directories for the file to be moved to, but the files never get uploaded. I've triple checke...
[ "php", "forms", "file", "upload" ]
1
1
5,139
1
0
2011-05-31T14:50:20.293000
2011-05-31T14:54:14.133000
6,189,423
6,189,593
Let user push only to his own branch
Does anyone know how one can restrict push to some git repository branch based on "pusher's" public key? Example: Alice wants to push changes to branch named "Bob" but push is refused on the server because her private key does not correspond to the public key stored in branch "Bob". Only Bob has the corresponding priva...
Have a look at Gitolite which allows this fine level of control. Personally - I think that if you need this level of control in your repository, you're perhaps doing it wrong, but I suppose you have your reasons. If you want to have branches that are read only to everyone but the pusher, why not just let Alice and Bob ...
Let user push only to his own branch Does anyone know how one can restrict push to some git repository branch based on "pusher's" public key? Example: Alice wants to push changes to branch named "Bob" but push is refused on the server because her private key does not correspond to the public key stored in branch "Bob"....
TITLE: Let user push only to his own branch QUESTION: Does anyone know how one can restrict push to some git repository branch based on "pusher's" public key? Example: Alice wants to push changes to branch named "Bob" but push is refused on the server because her private key does not correspond to the public key store...
[ "git", "permissions", "branch" ]
2
5
213
1
0
2011-05-31T14:50:43.743000
2011-05-31T15:02:53.707000
6,189,424
6,189,521
Create a session before an ajax call
I have this website where I can interact with the web both as a logged or anonymus user. When I click a link I call an ajax function: you click here: añadir a ruta This is my ajax function: var valor=$("#alcrearuta").attr('class'); $("#alcrearuta").click(function(){ $.ajax({ type: "GET", url: "../ajax/ruta.php", data: ...
if you want to use sessions in php, your php script (ruta.php) schould start with session_start(); from that point you can assign any variable to $_SESSION['Username'] $_SESSION['Username'] = something_to_generate_a_Username; Just like any other server request.
Create a session before an ajax call I have this website where I can interact with the web both as a logged or anonymus user. When I click a link I call an ajax function: you click here: añadir a ruta This is my ajax function: var valor=$("#alcrearuta").attr('class'); $("#alcrearuta").click(function(){ $.ajax({ type: "...
TITLE: Create a session before an ajax call QUESTION: I have this website where I can interact with the web both as a logged or anonymus user. When I click a link I call an ajax function: you click here: añadir a ruta This is my ajax function: var valor=$("#alcrearuta").attr('class'); $("#alcrearuta").click(function()...
[ "php", "mysql", "ajax" ]
1
3
338
3
0
2011-05-31T14:50:47.657000
2011-05-31T14:57:25.767000
6,189,426
6,189,652
How to create shared source folder across multiple projects in Eclipse?
I've been looking at the Android + App Engine source code from a Google IO session (Android meet App Engine). They generate three projects, an Android project, a GWT interface, and an App Engine server project. All of these projects have a common source folder called shared where they can put their synchronized data cl...
I am using Helios eclipse. To create Source Folder Navigate to your project in the package Explorer, right-click and select New, select Source Folder. Enter the folder name and click Finish. If you want to use the source folder in any of your projects, then go to your project properties, click Java Build Path, go to So...
How to create shared source folder across multiple projects in Eclipse? I've been looking at the Android + App Engine source code from a Google IO session (Android meet App Engine). They generate three projects, an Android project, a GWT interface, and an App Engine server project. All of these projects have a common s...
TITLE: How to create shared source folder across multiple projects in Eclipse? QUESTION: I've been looking at the Android + App Engine source code from a Google IO session (Android meet App Engine). They generate three projects, an Android project, a GWT interface, and an App Engine server project. All of these projec...
[ "android", "eclipse", "ide" ]
5
5
5,674
2
0
2011-05-31T14:50:52.667000
2011-05-31T15:07:54.707000
6,189,439
6,221,913
Reducing priority of MySQL commands/jobs (add an index/other commands)?
We have a moderately large production MySQL database. Periodically, we will run commands, usually via a rails migration, that while running, bog down the database. As a specific example, we might add an index to a large table. Is there any method that can reduce the priority MySQL gives to a specific task. A sort of "n...
We use multiple, replicated database servers to make changes like this. In our case, db1 is the master, replicated to db2. (db1->db2). Start by making the change to db2. If things lock, replication will stall, but that's OK. Move your traffic to db2. Any remnant traffic going to db1 will replicate over, so you won't lo...
Reducing priority of MySQL commands/jobs (add an index/other commands)? We have a moderately large production MySQL database. Periodically, we will run commands, usually via a rails migration, that while running, bog down the database. As a specific example, we might add an index to a large table. Is there any method t...
TITLE: Reducing priority of MySQL commands/jobs (add an index/other commands)? QUESTION: We have a moderately large production MySQL database. Periodically, we will run commands, usually via a rails migration, that while running, bog down the database. As a specific example, we might add an index to a large table. Is ...
[ "mysql", "ruby-on-rails", "performance" ]
4
2
681
2
0
2011-05-31T14:51:35.240000
2011-06-03T00:43:56.550000
6,189,447
6,194,773
WCF RIA SERVICE How many object are sent across network
I have Collection of objects. They are have reference to the same object. Is it one object will be send across network? UPD Hello. I have Collection of objects. They are have reference to the same object. Is this same object will be send across network in one instance or for each object in Collection?(Collection is sen...
Each object is sent only once. For example, you have a parent-child set of objects. Five of the child objects refer to the parent. When sending the set of children to the client, the parent object is serialized into the response only once. The [Key] attribute is used to identify an object as unique. Unique objects are ...
WCF RIA SERVICE How many object are sent across network I have Collection of objects. They are have reference to the same object. Is it one object will be send across network? UPD Hello. I have Collection of objects. They are have reference to the same object. Is this same object will be send across network in one inst...
TITLE: WCF RIA SERVICE How many object are sent across network QUESTION: I have Collection of objects. They are have reference to the same object. Is it one object will be send across network? UPD Hello. I have Collection of objects. They are have reference to the same object. Is this same object will be send across n...
[ "wcf-ria-services" ]
0
1
139
2
0
2011-05-31T14:52:17.313000
2011-05-31T23:42:04.600000
6,189,464
6,189,607
add settings in Android builtin Settings
I want to add an item in android builtin settings, for my application. Can any body guide me through any tutorial or code that how can i acheive this? Thanks a bunch in advance!
Something tells me this is not what you want... I don't know how to achieve it but I have a feeling if it is even possible, it wouldn't work on all devices. I'd stick to an in app settings menu like everything else. At least that way you know it's possible and will work on all devices.
add settings in Android builtin Settings I want to add an item in android builtin settings, for my application. Can any body guide me through any tutorial or code that how can i acheive this? Thanks a bunch in advance!
TITLE: add settings in Android builtin Settings QUESTION: I want to add an item in android builtin settings, for my application. Can any body guide me through any tutorial or code that how can i acheive this? Thanks a bunch in advance! ANSWER: Something tells me this is not what you want... I don't know how to achiev...
[ "android", "settings", "application-settings" ]
0
1
300
1
0
2011-05-31T14:53:27.500000
2011-05-31T15:03:55.800000
6,189,481
6,189,667
Is there a way to send low res binary images to mobile phones using the USSD protocol?
Is there a way to send low res binary images to mobile phones using the USSD protocol? I know that OTA bitmap allows us to send similar images through SMS; however, I could not find anything on USSD that details this.
No. USSD does not have any defined methods to specify content type, nor does it really support segmentation and reassembly of even small binary data sequences. It might be possible given operator cooperation to do something that worked but itwould be a bad hack and probably not very widely distributable
Is there a way to send low res binary images to mobile phones using the USSD protocol? Is there a way to send low res binary images to mobile phones using the USSD protocol? I know that OTA bitmap allows us to send similar images through SMS; however, I could not find anything on USSD that details this.
TITLE: Is there a way to send low res binary images to mobile phones using the USSD protocol? QUESTION: Is there a way to send low res binary images to mobile phones using the USSD protocol? I know that OTA bitmap allows us to send similar images through SMS; however, I could not find anything on USSD that details thi...
[ "ota", "ussd" ]
1
1
536
1
0
2011-05-31T14:54:46.237000
2011-05-31T15:08:54.660000
6,189,482
6,189,686
add element to carousel sencha
In sencha touch, I have a carousel declared like this: ajaxNav = new Ext.Panel({ scroll: 'vertical', cls: 'card1 demo-data', styleHtmlContent: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { flex: 1 }, items: [{ xtype: 'carousel', items: [{ id:'tab-1', html: '', cls: 'card card1' }, { id:'tab-2', html: ' ...
I write you a simple example to show you how to dinamically add a new panel to an existing Ext.Carousel element. Ext.setup({ onReady: function() { var ajaxNav = new Ext.Carousel({ fullscreen: true, dockedItems: { xtype: 'toolbar', title: 'Demo', items: [{ xtype: 'button', ui: 'action', text: 'Add', handler: function(...
add element to carousel sencha In sencha touch, I have a carousel declared like this: ajaxNav = new Ext.Panel({ scroll: 'vertical', cls: 'card1 demo-data', styleHtmlContent: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { flex: 1 }, items: [{ xtype: 'carousel', items: [{ id:'tab-1', html: '', cls: 'card c...
TITLE: add element to carousel sencha QUESTION: In sencha touch, I have a carousel declared like this: ajaxNav = new Ext.Panel({ scroll: 'vertical', cls: 'card1 demo-data', styleHtmlContent: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { flex: 1 }, items: [{ xtype: 'carousel', items: [{ id:'tab-1', html...
[ "addition", "element", "extjs", "carousel" ]
2
6
4,631
1
0
2011-05-31T14:54:55.033000
2011-05-31T15:10:29.917000
6,189,485
6,189,556
Is there anyway to open a facebook URL in the facebook app of a phone?
Possible Duplicate: launch facebook app from other app I was wondering if there is anyway I could put a facebook link into a webpage, and, if a facebook app is installed, to get the link to facebook open in the fb app instead of the broswer?
The facebook application link starts with fb://, (according to this site ), for the iPhone. So in theory clicking a link that starts with fb:// would launch the facebook app. The problem is that the web browser application (Safari, or some custom app) decides how to handle that link, and it won't necessarily try to ope...
Is there anyway to open a facebook URL in the facebook app of a phone? Possible Duplicate: launch facebook app from other app I was wondering if there is anyway I could put a facebook link into a webpage, and, if a facebook app is installed, to get the link to facebook open in the fb app instead of the broswer?
TITLE: Is there anyway to open a facebook URL in the facebook app of a phone? QUESTION: Possible Duplicate: launch facebook app from other app I was wondering if there is anyway I could put a facebook link into a webpage, and, if a facebook app is installed, to get the link to facebook open in the fb app instead of th...
[ "iphone", "android", "html", "facebook", "blackberry" ]
4
7
19,048
3
0
2011-05-31T14:54:57.957000
2011-05-31T15:00:17.903000
6,189,495
6,206,779
EXEC statement and Transaction Scope
This seemed so easy at first but everything I know seems to be wrong again. Looking at PAQ's the consensus seems to be that EXEC does not start an implicit transaction, you can test this doing: create procedure usp_foo as begin select @@trancount; end go exec usp_foo; which returns 0. If you however step through this ...
Your test must be giving you correct results because you are not fast enough to invoke the second call in between these two statements. Try adding a delay and you can see that the test would start failing. CREATE TABLE NextID ( ID int ) GO INSERT INTO NextID VALUES (0) GO CREATE PROC GetNextID AS BEGIN UPDATE NextID ...
EXEC statement and Transaction Scope This seemed so easy at first but everything I know seems to be wrong again. Looking at PAQ's the consensus seems to be that EXEC does not start an implicit transaction, you can test this doing: create procedure usp_foo as begin select @@trancount; end go exec usp_foo; which returns...
TITLE: EXEC statement and Transaction Scope QUESTION: This seemed so easy at first but everything I know seems to be wrong again. Looking at PAQ's the consensus seems to be that EXEC does not start an implicit transaction, you can test this doing: create procedure usp_foo as begin select @@trancount; end go exec usp_...
[ "sql", "sql-server-2008", "transactions" ]
1
1
2,240
1
0
2011-05-31T14:55:58.280000
2011-06-01T19:46:53.357000
6,189,498
6,190,752
Path-independant management of shared C libs inside a Python package
Say I have a package called Foo organized this way: Foo\ __init__.py foo.py bar.py lib\ libwhatever.so My module foo.py uses python ctypes to wrap the C-methods contained in my libwhatever.lib, which involves checking the lib is where it should be. 2 questions: 1) How to check in my package that the required lib is at ...
Assuming you're on Linux, I think you'll have to either add that.so file to your library search path, or add the module directory to your path. Have a look at ldconfig. man ldconfig. Once you do either of those, you could use ctypes.util.find_library(). Otherwise you would have to have the full path to the.so file to u...
Path-independant management of shared C libs inside a Python package Say I have a package called Foo organized this way: Foo\ __init__.py foo.py bar.py lib\ libwhatever.so My module foo.py uses python ctypes to wrap the C-methods contained in my libwhatever.lib, which involves checking the lib is where it should be. 2 ...
TITLE: Path-independant management of shared C libs inside a Python package QUESTION: Say I have a package called Foo organized this way: Foo\ __init__.py foo.py bar.py lib\ libwhatever.so My module foo.py uses python ctypes to wrap the C-methods contained in my libwhatever.lib, which involves checking the lib is wher...
[ "python", "package", "ctypes" ]
3
1
94
1
0
2011-05-31T14:56:20.230000
2011-05-31T16:40:37.290000
6,189,502
6,189,542
How to convert value types returned by the MethodInfo.Invoke method, to their proper type?
I'd like to invoke a method that returns a struct, using the MethodInfo.Invoke method. However, the returned variable's type of this metod is object, which cannot be cast to a struct. (found that, as well as the suggestion to switch from struct to class, here: http://msdn.microsoft.com/en-us/library/b7tch9h0(VS.90).asp...
The cast fails because they are different types, more specifically one is MyInvokedClass.MyStruct and the other is MyInvokingClass.MyStruct. When InvokedMethod gets called the MyStruct refers to the type nested inside the MyInvokedClass, but the when the cast is performed (MyStruct) refers to the type nested inside the...
How to convert value types returned by the MethodInfo.Invoke method, to their proper type? I'd like to invoke a method that returns a struct, using the MethodInfo.Invoke method. However, the returned variable's type of this metod is object, which cannot be cast to a struct. (found that, as well as the suggestion to swi...
TITLE: How to convert value types returned by the MethodInfo.Invoke method, to their proper type? QUESTION: I'd like to invoke a method that returns a struct, using the MethodInfo.Invoke method. However, the returned variable's type of this metod is object, which cannot be cast to a struct. (found that, as well as the...
[ "c#", ".net", "reflection", "methodinfo" ]
2
3
3,679
3
0
2011-05-31T14:56:27.957000
2011-05-31T14:59:09.263000
6,189,503
6,189,695
What diagnostic approaches to take to debug .NET production application
The app. sporadically hangs sometimes, shoots up in memory and sometimes just dies out. This behavior might not be available in dev. environment. What all approaches can one take to find the problem areas? In case of web app and what in case of thick WPF app. I am interested to know of approaches, i do not currently ha...
The first-of-everything which is a must for every debugging scenario: Get your issue reproducible! Said that, there are different approaches how to to accomplish this, depending much on what kind of application you have. For example, if you have a user sitting on front of your program to which you can talk directly, an...
What diagnostic approaches to take to debug .NET production application The app. sporadically hangs sometimes, shoots up in memory and sometimes just dies out. This behavior might not be available in dev. environment. What all approaches can one take to find the problem areas? In case of web app and what in case of thi...
TITLE: What diagnostic approaches to take to debug .NET production application QUESTION: The app. sporadically hangs sometimes, shoots up in memory and sometimes just dies out. This behavior might not be available in dev. environment. What all approaches can one take to find the problem areas? In case of web app and w...
[ ".net", "debugging" ]
0
1
134
1
0
2011-05-31T14:56:28.233000
2011-05-31T15:11:07.607000
6,189,509
6,189,588
How to disable automatic line break when inserting two curly braces in vim?
Whenever I type two curly braces ( {{ ), I get something like that: { | } | is used to describe the position of the cursor. This behaviour is totally annoying, e.g. when using different template engines which reserve this syntax for variables. How can I find out where that behaviour comes from? And how do I shut it off...
To find out where it comes from::verbose imap {{:verbose map {{ Look for the mapping with 'i' (insert mode mapping) and see where it is defined If that's not it, it could be an abbreviation::verbose abbrev
How to disable automatic line break when inserting two curly braces in vim? Whenever I type two curly braces ( {{ ), I get something like that: { | } | is used to describe the position of the cursor. This behaviour is totally annoying, e.g. when using different template engines which reserve this syntax for variables. ...
TITLE: How to disable automatic line break when inserting two curly braces in vim? QUESTION: Whenever I type two curly braces ( {{ ), I get something like that: { | } | is used to describe the position of the cursor. This behaviour is totally annoying, e.g. when using different template engines which reserve this synt...
[ "vim", "curly-braces", "line-breaks" ]
4
5
957
2
0
2011-05-31T14:56:40.633000
2011-05-31T15:02:43.693000
6,189,513
6,189,568
Custom Asp.net server controls that will work in MVC and Web Forms?
Is it possible to develop controls that will work in both Asp.net Web Forms and MVC? It seems that we're heading for a situation where we now have to maintain another set of code for MVC over and above the code being maintained for Silverlight and Web Forms and heaven knows what else.
It is possible, but not pretty. MVC does not have the ViewState.
Custom Asp.net server controls that will work in MVC and Web Forms? Is it possible to develop controls that will work in both Asp.net Web Forms and MVC? It seems that we're heading for a situation where we now have to maintain another set of code for MVC over and above the code being maintained for Silverlight and Web ...
TITLE: Custom Asp.net server controls that will work in MVC and Web Forms? QUESTION: Is it possible to develop controls that will work in both Asp.net Web Forms and MVC? It seems that we're heading for a situation where we now have to maintain another set of code for MVC over and above the code being maintained for Si...
[ "asp.net-mvc", "webforms" ]
1
0
65
1
0
2011-05-31T14:56:52.527000
2011-05-31T15:01:40.747000
6,189,514
6,205,449
Stopping Tomcat with script: Connection Refused Error
I am attempting to write a short bash script to auto-load a war in such a way as to preserve the config file I have on the tomcat server. However, sometimes when I attempt to stop tomcat within the script, it gives me this error: Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.32~ Using CATALINA_HOME: /usr/local/apac...
So, the solution I found to my specific problem is to simply use the jar command (duh) to unpack the war rather than restarting the server. Here is my new code: #!/bin/bash # Script to redeploy war, needs path to the new war if [! -f $1 ]; then echo "File $1 not found! Get it right this time." exit 0; fi #Check if tom...
Stopping Tomcat with script: Connection Refused Error I am attempting to write a short bash script to auto-load a war in such a way as to preserve the config file I have on the tomcat server. However, sometimes when I attempt to stop tomcat within the script, it gives me this error: Using CATALINA_BASE: /usr/local/apac...
TITLE: Stopping Tomcat with script: Connection Refused Error QUESTION: I am attempting to write a short bash script to auto-load a war in such a way as to preserve the config file I have on the tomcat server. However, sometimes when I attempt to stop tomcat within the script, it gives me this error: Using CATALINA_BAS...
[ "tomcat", "connection" ]
1
1
2,973
1
0
2011-05-31T14:56:56.797000
2011-06-01T17:44:11.900000
6,189,522
6,201,192
Use dynamic url for Backbone Collection
Backbone configure url once for all when a Collection is created. Is there a way to change this url later? The following sample shows 2 POST at /product and 2 POST at /product/id/stock. The last POST won't work, Backbone concatenate the id and try to PUT it, but I don't know why. products.create({ name: 'American Pasto...
Backbone.js will use the url of the model when saving existing models. Its not quite clear what you are trying to do -- I don't know what stocks is, for instance. Anyway, your code probably needs to look similar to the below and you should not be dynamically changing the url: Product = Backbone.Model.extend({ url: fun...
Use dynamic url for Backbone Collection Backbone configure url once for all when a Collection is created. Is there a way to change this url later? The following sample shows 2 POST at /product and 2 POST at /product/id/stock. The last POST won't work, Backbone concatenate the id and try to PUT it, but I don't know why....
TITLE: Use dynamic url for Backbone Collection QUESTION: Backbone configure url once for all when a Collection is created. Is there a way to change this url later? The following sample shows 2 POST at /product and 2 POST at /product/id/stock. The last POST won't work, Backbone concatenate the id and try to PUT it, but...
[ "url", "collections", "backbone.js" ]
7
6
8,679
3
0
2011-05-31T14:57:29.573000
2011-06-01T12:32:42.703000
6,189,526
6,189,613
File checking code for F#
I have this code to raise an error when file doesn't exist. if!File.Exists(doFile) then printfn "doFile doesn't exist %s" doFile; failwith "quit" However, I got this error. What's wrong? error FS0001: This expression was expected to have type bool ref but here has type bool
The! operator has a special meaning in F#, its defined as: type 'a ref { Contents: 'a } let (!) (x: ref 'a) = x.Contents You're getting the error because the! operator expects a bool ref, but you passed it a bool. Use the not function instead: if not(File.Exists(doFile)) then printfn "doFile doesn't exist %s" doFile; f...
File checking code for F# I have this code to raise an error when file doesn't exist. if!File.Exists(doFile) then printfn "doFile doesn't exist %s" doFile; failwith "quit" However, I got this error. What's wrong? error FS0001: This expression was expected to have type bool ref but here has type bool
TITLE: File checking code for F# QUESTION: I have this code to raise an error when file doesn't exist. if!File.Exists(doFile) then printfn "doFile doesn't exist %s" doFile; failwith "quit" However, I got this error. What's wrong? error FS0001: This expression was expected to have type bool ref but here has type bool ...
[ "file", "f#" ]
11
17
2,833
2
0
2011-05-31T14:58:05.330000
2011-05-31T15:04:21.740000
6,189,528
6,189,567
On load event problem
I have a problem when I want to update a row in a database. The page that updates also adds a client but the problem is that when page load detects update button was pressed it seems to keep loading up the variables and I am unable to update my database. public partial class CustomerInput: System.Web.UI.Page { string u...
At the start of your page load event you need to add an if statement to check if this is the first time the page loads: example: if (!IsPostBack) {... add your code here }
On load event problem I have a problem when I want to update a row in a database. The page that updates also adds a client but the problem is that when page load detects update button was pressed it seems to keep loading up the variables and I am unable to update my database. public partial class CustomerInput: System....
TITLE: On load event problem QUESTION: I have a problem when I want to update a row in a database. The page that updates also adds a client but the problem is that when page load detects update button was pressed it seems to keep loading up the variables and I am unable to update my database. public partial class Cust...
[ "c#", "asp.net", "sql", "onload-event" ]
0
2
497
2
0
2011-05-31T14:58:07.377000
2011-05-31T15:01:38.750000
6,189,529
6,189,583
show pdf with bytestream in an updatepanel
I want to send a pfd in bytestream to the user in an updatepanel, but I can't get it to work. Print print = new Print(); byte[] pdfTransport; pdfTransport = //get the byte array Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/pdf"; Response.AddHeader("Content-Disposition", "attachm...
Actually you can't send byte streams through an AJAX request, it's just a technology limitation. And UpdatePanel uses asynchronous requests (AJAX).
show pdf with bytestream in an updatepanel I want to send a pfd in bytestream to the user in an updatepanel, but I can't get it to work. Print print = new Print(); byte[] pdfTransport; pdfTransport = //get the byte array Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/pdf"; Respons...
TITLE: show pdf with bytestream in an updatepanel QUESTION: I want to send a pfd in bytestream to the user in an updatepanel, but I can't get it to work. Print print = new Print(); byte[] pdfTransport; pdfTransport = //get the byte array Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "applica...
[ "c#", "asp.net", "filestream" ]
1
1
1,168
2
0
2011-05-31T14:58:08.110000
2011-05-31T15:02:23.053000
6,189,536
6,189,810
Programmatically control login with Servlet 3.0
I've tested the default security containers in Glassfish 3.0.1 and come to the conclusion that I won't spend any more time on that. Instead I want to control the verification myself. But I need some guidance to get me on right track. At the moment I have a UserBean that has a login/logout function (see below). And I do...
When you want to utilize request.login(), then you should really have configured a Realm in the container which represents the user database. But you seem to have replaced the Realm by some AuthenticationFacade. In this case, the request.login() is not useful for you. You need to just put the user in the session scope ...
Programmatically control login with Servlet 3.0 I've tested the default security containers in Glassfish 3.0.1 and come to the conclusion that I won't spend any more time on that. Instead I want to control the verification myself. But I need some guidance to get me on right track. At the moment I have a UserBean that h...
TITLE: Programmatically control login with Servlet 3.0 QUESTION: I've tested the default security containers in Glassfish 3.0.1 and come to the conclusion that I won't spend any more time on that. Instead I want to control the verification myself. But I need some guidance to get me on right track. At the moment I have...
[ "jsf", "servlets", "servlet-filters" ]
6
9
7,102
2
0
2011-05-31T14:58:43.240000
2011-05-31T15:20:13.923000
6,189,538
6,191,154
CRM 2011 - How to install different solutions (features) for a client of our company
We offer multiple packages with features for our clients with Microsoft Dynamics CRM. Is there a way where we can publish our sollutions with our modifications for certain entities without overwriting the form layout that already existed. How should we organise our sollutions so there will be no conflicts within the en...
We broke up each section of our project into solutions. For example, entities, reports, plugins, etc. This allowed us to deploy bits and pieces of our project as we went along (moving from dev -> test -> production). You can't break out pieces of entities (or exclude things like the forms), but you could export the exi...
CRM 2011 - How to install different solutions (features) for a client of our company We offer multiple packages with features for our clients with Microsoft Dynamics CRM. Is there a way where we can publish our sollutions with our modifications for certain entities without overwriting the form layout that already exist...
TITLE: CRM 2011 - How to install different solutions (features) for a client of our company QUESTION: We offer multiple packages with features for our clients with Microsoft Dynamics CRM. Is there a way where we can publish our sollutions with our modifications for certain entities without overwriting the form layout ...
[ "dynamics-crm-2011" ]
1
2
347
1
0
2011-05-31T14:58:57.530000
2011-05-31T17:22:23.353000
6,189,545
6,191,245
Excel VB For loop is not iterating through if statement
I appreciate this is an amateurish question but I am not used to VB and its syntax. I am trying to pull across information from one worksheet (ProductList) to another (Quote) based on whether or not there is a value in the quantity (QTY) column. Here is my method: Private Sub cmdProductListContinue_Click() 'Declare va...
Here you are assigning qty to an object (a range): Set qty = Worksheets("ProductList").Cells(i, 3) If you instead want to get the cell value then use: qty = Worksheets("ProductList").Cells(i, 3).Value "Set" is used when assigning an object, so you don't need it here. "Value" is the default property, but I prefer to inc...
Excel VB For loop is not iterating through if statement I appreciate this is an amateurish question but I am not used to VB and its syntax. I am trying to pull across information from one worksheet (ProductList) to another (Quote) based on whether or not there is a value in the quantity (QTY) column. Here is my method:...
TITLE: Excel VB For loop is not iterating through if statement QUESTION: I appreciate this is an amateurish question but I am not used to VB and its syntax. I am trying to pull across information from one worksheet (ProductList) to another (Quote) based on whether or not there is a value in the quantity (QTY) column. ...
[ "excel", "vba", "if-statement", "for-loop" ]
1
4
4,577
2
0
2011-05-31T14:59:32.727000
2011-05-31T17:29:45.053000
6,189,547
6,252,472
Request to web service with Basic authorization via proxy with NTLM authorization not working
I have a web service that requires basic authorisation and a user behind an internet proxy that requires NTLM authorisation. I also have a forms application that makes calls to the web service and also asks the user for the web service credentials (which are different from the NTLM credentials). I got the app configura...
I had to change the server security configuration to accept Digest authentication. For some reason that works while Basic doesn't.
Request to web service with Basic authorization via proxy with NTLM authorization not working I have a web service that requires basic authorisation and a user behind an internet proxy that requires NTLM authorisation. I also have a forms application that makes calls to the web service and also asks the user for the we...
TITLE: Request to web service with Basic authorization via proxy with NTLM authorization not working QUESTION: I have a web service that requires basic authorisation and a user behind an internet proxy that requires NTLM authorisation. I also have a forms application that makes calls to the web service and also asks t...
[ "web-services", "proxy", "ntlm", "basic-authentication", "wcf" ]
5
1
8,745
2
0
2011-05-31T14:59:34.570000
2011-06-06T13:08:38.467000
6,189,569
6,189,646
Android View with 'hole' in it
I've created a custom camera view for Android. I have overlayed the camera preview with a semi transparent LinearLayout with a TextView and Button. Now I need to punch a 'hole' in the middle of the view so you can see the underlying camera preview clearly. The hole then acts as a frame guideline allowing the user to 'f...
You're going to need to start with the hole and build around it. Layers in Android are additive, there is no way to punch a hole.
Android View with 'hole' in it I've created a custom camera view for Android. I have overlayed the camera preview with a semi transparent LinearLayout with a TextView and Button. Now I need to punch a 'hole' in the middle of the view so you can see the underlying camera preview clearly. The hole then acts as a frame gu...
TITLE: Android View with 'hole' in it QUESTION: I've created a custom camera view for Android. I have overlayed the camera preview with a semi transparent LinearLayout with a TextView and Button. Now I need to punch a 'hole' in the middle of the view so you can see the underlying camera preview clearly. The hole then ...
[ "android", "layout", "android-linearlayout", "android-camera" ]
4
0
3,348
3
0
2011-05-31T15:01:45.287000
2011-05-31T15:07:30.400000
6,189,570
6,189,751
Mathematica and MouseListener - developing interactive graphics with Mma
I want to add interactivity to Mathematica 3D graphics, other than with Manipulate which is cool but has its limitations. Think four example of a demo of the four cubes problem in Mathematica, a click on one of the cubes rotates a cube. Questions. Is it possible to catch MouseEvents in Mathematica graphics ( for exampl...
EventHandler can be used to catch various mouse events (mouse up, mouse down, mouse clicked, mouse dragged). Use MousePosition to add some intelligence. Example: DynamicModule[{col1 = Green, col2 = Blue}, Graphics[ { EventHandler[ Dynamic[{col1, Disk[]}, ImageSize -> Tiny], {"MouseClicked":> (col1 = col1 /. {Red -> Gre...
Mathematica and MouseListener - developing interactive graphics with Mma I want to add interactivity to Mathematica 3D graphics, other than with Manipulate which is cool but has its limitations. Think four example of a demo of the four cubes problem in Mathematica, a click on one of the cubes rotates a cube. Questions....
TITLE: Mathematica and MouseListener - developing interactive graphics with Mma QUESTION: I want to add interactivity to Mathematica 3D graphics, other than with Manipulate which is cool but has its limitations. Think four example of a demo of the four cubes problem in Mathematica, a click on one of the cubes rotates ...
[ "wolfram-mathematica" ]
8
16
969
1
0
2011-05-31T15:01:46.623000
2011-05-31T15:15:00.743000
6,189,601
6,190,235
injection of property in xml fails (spring-ws config)
i'm using Spring-WS and have the following spring-ws-servlet.xml file. The injection of defaultURI and marshaller doesn't work because when i get to the method in the client of the service these properties are null. What happens is that the setters are being called with correct values, but in the method of the client g...
Are you new 'ing the SpringWSClient instance in your code? Also, for the streetDao, you shouldn't need to use SpringUtils.getBean. Instead, it should be a field annotated with @Autowired (or @Resource ).
injection of property in xml fails (spring-ws config) i'm using Spring-WS and have the following spring-ws-servlet.xml file. The injection of defaultURI and marshaller doesn't work because when i get to the method in the client of the service these properties are null. What happens is that the setters are being called ...
TITLE: injection of property in xml fails (spring-ws config) QUESTION: i'm using Spring-WS and have the following spring-ws-servlet.xml file. The injection of defaultURI and marshaller doesn't work because when i get to the method in the client of the service these properties are null. What happens is that the setters...
[ "spring", "spring-ws" ]
2
4
4,640
1
0
2011-05-31T15:03:30.333000
2011-05-31T15:53:10.223000
6,189,606
6,189,842
Configure IIS to impersonate a user for SQL Integrated Authentication
I have a question about how to configure my web site and IIS using Active Directory. I have a web app which will be running exclusively on our company's internal network. The SQL Database that the app needs to connect to (via active directory) can only be accessed by one specific AD user DBAccess but I am using Windows...
Set the application pool your application is using to run as the user you wish to connect to the DB as. Add Integrated Security=true; to your connection string.
Configure IIS to impersonate a user for SQL Integrated Authentication I have a question about how to configure my web site and IIS using Active Directory. I have a web app which will be running exclusively on our company's internal network. The SQL Database that the app needs to connect to (via active directory) can on...
TITLE: Configure IIS to impersonate a user for SQL Integrated Authentication QUESTION: I have a question about how to configure my web site and IIS using Active Directory. I have a web app which will be running exclusively on our company's internal network. The SQL Database that the app needs to connect to (via active...
[ "connection-string", "iis-7.5", "integrated-security" ]
0
1
4,012
1
0
2011-05-31T15:03:46.673000
2011-05-31T15:22:32.680000
6,189,616
6,189,766
Long dynamic Oracle query and How to debug it
I have a stored procedure that, I am currently working on which uses dynamic sql query. It has one variable assigned to (5000 - 6000 characters of dynamic SQL) and another variable assigned to (5000 - 6000 characters of dynamic SQL) and a UNION ALL between both the variables. I got the dynamic query from the procedure ...
You can run a dynamic query (if that is the term), but not in this way. You can execute a query string using EXECUTE IMMEDIATE 'sqlstring' or using OPEN c FOR 'sqlstring' and there is a package too that lets you execute a query with bound parameters. But all these require that the query is a single string, so I'd sugge...
Long dynamic Oracle query and How to debug it I have a stored procedure that, I am currently working on which uses dynamic sql query. It has one variable assigned to (5000 - 6000 characters of dynamic SQL) and another variable assigned to (5000 - 6000 characters of dynamic SQL) and a UNION ALL between both the variable...
TITLE: Long dynamic Oracle query and How to debug it QUESTION: I have a stored procedure that, I am currently working on which uses dynamic sql query. It has one variable assigned to (5000 - 6000 characters of dynamic SQL) and another variable assigned to (5000 - 6000 characters of dynamic SQL) and a UNION ALL between...
[ "sql", "oracle10g", "dynamic-sql" ]
1
3
1,295
1
0
2011-05-31T15:04:40.697000
2011-05-31T15:16:20.470000
6,189,628
6,190,678
Private readonly Interface - is it redundant?
I am using IoC and DI for my project. However I was wondering if it is good practise to have the following: private readonly IMyService myservice; as the field inside the class that is a consumer of the service. The field is set in the constructor. I'm sure I've seen this somewhere and I've picked up on it. However I a...
I consider use of the readonly keyword a central part of proper implementation of Constructor Injection. public class MyClass { private readonly IMyService myservice; public MyClass(IMyService myservice) { if (myservice == null) { throw new ArgumentNullException("myservice"); } this.myservice = myservice; } } Neither ...
Private readonly Interface - is it redundant? I am using IoC and DI for my project. However I was wondering if it is good practise to have the following: private readonly IMyService myservice; as the field inside the class that is a consumer of the service. The field is set in the constructor. I'm sure I've seen this s...
TITLE: Private readonly Interface - is it redundant? QUESTION: I am using IoC and DI for my project. However I was wondering if it is good practise to have the following: private readonly IMyService myservice; as the field inside the class that is a consumer of the service. The field is set in the constructor. I'm sur...
[ "c#", ".net", "dependency-injection" ]
7
8
5,314
5
0
2011-05-31T15:06:11.447000
2011-05-31T16:33:32.687000
6,189,630
6,193,287
Java - JSON Object and ListOrderedMap problem
I am trying to use the JSON-lib api in my code to convert a java object into a JSONObject. I have added all of the dependencies with the versions specified on the link below to my j2ee web module dependencies http://json-lib.sourceforge.net/ However, whenever I call the JSONObject.fromObject() method I get NoSuchMethod...
Make sure you have the correct version of commons collections jar in your WEB-INF/lib and then set the "Classes loaded with application class loader first" option in your WebSphere admin console as shown here
Java - JSON Object and ListOrderedMap problem I am trying to use the JSON-lib api in my code to convert a java object into a JSONObject. I have added all of the dependencies with the versions specified on the link below to my j2ee web module dependencies http://json-lib.sourceforge.net/ However, whenever I call the JSO...
TITLE: Java - JSON Object and ListOrderedMap problem QUESTION: I am trying to use the JSON-lib api in my code to convert a java object into a JSONObject. I have added all of the dependencies with the versions specified on the link below to my j2ee web module dependencies http://json-lib.sourceforge.net/ However, whene...
[ "java", "websphere", "nosuchmethoderror", "apache-commons-collection" ]
0
0
5,785
1
0
2011-05-31T15:06:26.657000
2011-05-31T20:40:08.437000
6,189,636
6,189,762
fortran debugging problem
I have compiled code but it doesn't work properly.My makefile: FC= ifort LD = ifort -align all FCFLAGS = -O0 -g -ipo -traceback -warn noalign LDFLAGS = $(FCFLAGS) # Executables nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o...
You are reading past the end of the file: /home/milenko/fast/ray/num.cell this is either because num.cell isn't long enough or your reading routine isn't stopping at the right place. The offending read is at line 226 of main.f or at least called there. Can't really say much more without seeing some code. It seems unlik...
fortran debugging problem I have compiled code but it doesn't work properly.My makefile: FC= ifort LD = ifort -align all FCFLAGS = -O0 -g -ipo -traceback -warn noalign LDFLAGS = $(FCFLAGS) # Executables nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsr...
TITLE: fortran debugging problem QUESTION: I have compiled code but it doesn't work properly.My makefile: FC= ifort LD = ifort -align all FCFLAGS = -O0 -g -ipo -traceback -warn noalign LDFLAGS = $(FCFLAGS) # Executables nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o a...
[ "ide", "fortran" ]
0
2
245
2
0
2011-05-31T15:06:44.583000
2011-05-31T15:16:00.600000
6,189,637
6,189,886
problems with update statement in SQLite
I have created a database using SQLite. I want to update the value of a "features" column( type Blob)...but i do not know how to write the "update" statement. This is what i tried: try { stat = conn.createStatement(); } catch (SQLException e) { } try { byte[] b = getFunction(); stat.executeUpdate("update table set feat...
Try this one with PreparedStatement: Connection con = null; PreparedStatement stmt = null; try { byte[] b = getFunction(); con =...; stmt = con.prepareStatement("update table set features=?"); stmt.setBytes(1, b); stmt.executeUpdate(); con.commit(); } catch (SQLException e) { //handle exception (consider con.rollback...
problems with update statement in SQLite I have created a database using SQLite. I want to update the value of a "features" column( type Blob)...but i do not know how to write the "update" statement. This is what i tried: try { stat = conn.createStatement(); } catch (SQLException e) { } try { byte[] b = getFunction(); ...
TITLE: problems with update statement in SQLite QUESTION: I have created a database using SQLite. I want to update the value of a "features" column( type Blob)...but i do not know how to write the "update" statement. This is what i tried: try { stat = conn.createStatement(); } catch (SQLException e) { } try { byte[] b...
[ "java", "sqlite" ]
2
3
3,250
3
0
2011-05-31T15:06:48.623000
2011-05-31T15:25:17.623000
6,189,638
6,189,682
C# Handle a dialog's button click in another form
I have a form. In that I got to show a dialog (on some circumstances) with Text and a Cancel button. I want to catch the event of that button in my form Or know if that cancel button was clicked. How can this be done? I believe this should be possible but can't make out how? From my mainForm I have BackgroundWorker. Wh...
Put this in the form that should catch the event: frmDialog.ShowDialog(); And this in the btnCancel_Click event of the dialog: return DialogResult.Cancel(); Sorry if I'm confusing VB and C# here, but it's pretty much the same.
C# Handle a dialog's button click in another form I have a form. In that I got to show a dialog (on some circumstances) with Text and a Cancel button. I want to catch the event of that button in my form Or know if that cancel button was clicked. How can this be done? I believe this should be possible but can't make out...
TITLE: C# Handle a dialog's button click in another form QUESTION: I have a form. In that I got to show a dialog (on some circumstances) with Text and a Cancel button. I want to catch the event of that button in my form Or know if that cancel button was clicked. How can this be done? I believe this should be possible ...
[ "c#", "winforms", "button", "dialog", "click" ]
2
1
8,226
6
0
2011-05-31T15:06:54.723000
2011-05-31T15:10:25.233000
6,189,643
6,189,754
Removing weekends in a vector filled with Dates
I have a vector that is created by retrieving data from a database It is filled with information that includes Date, Time, Volume ect... I need to create a spreadsheet from these values however I need to Remove values where the date is on a weekend(and specific holidays if possible) but more importantly the weekends If...
If you have a Date object in Java, then you can use the Calendar object to do this. Get an instance of the Calendar, then call get(Calendar.DAY_OF_WEEK). If the value is Saturday or Sunday, remove it from your Collection. Calendar calendar = Calendar.getInstance(); calendar.setTime(yourDateObject); int dayOfWeek = cale...
Removing weekends in a vector filled with Dates I have a vector that is created by retrieving data from a database It is filled with information that includes Date, Time, Volume ect... I need to create a spreadsheet from these values however I need to Remove values where the date is on a weekend(and specific holidays i...
TITLE: Removing weekends in a vector filled with Dates QUESTION: I have a vector that is created by retrieving data from a database It is filled with information that includes Date, Time, Volume ect... I need to create a spreadsheet from these values however I need to Remove values where the date is on a weekend(and s...
[ "java" ]
0
5
1,113
2
0
2011-05-31T15:07:13.160000
2011-05-31T15:15:23.847000
6,189,648
6,189,723
Implementing ImageViewTouch on Gallery
I have a code with a ImageViewTouch image that have pinch zoom, but i cant implement it on the gallery, i tried everything like setting in the ImageAdapter, it works but the Gallery wont scroll. I think that another solution will be using a ImageSwitcher. I ask if somebody have a code of a Gallery Implementing a ImageV...
The only thing I've found that works is to set an OnTouchListener on the Gallery itself, and then manually map the coordinates of the touch event to the underlying view with getLocationOnScreen.
Implementing ImageViewTouch on Gallery I have a code with a ImageViewTouch image that have pinch zoom, but i cant implement it on the gallery, i tried everything like setting in the ImageAdapter, it works but the Gallery wont scroll. I think that another solution will be using a ImageSwitcher. I ask if somebody have a ...
TITLE: Implementing ImageViewTouch on Gallery QUESTION: I have a code with a ImageViewTouch image that have pinch zoom, but i cant implement it on the gallery, i tried everything like setting in the ImageAdapter, it works but the Gallery wont scroll. I think that another solution will be using a ImageSwitcher. I ask i...
[ "android", "imageview", "zooming", "gallery" ]
0
0
1,187
1
0
2011-05-31T15:07:31.413000
2011-05-31T15:13:00.650000
6,189,657
6,190,264
Inserting XML Fragment after last specific node/element
I want to add an XML fragment to the last element to an XML document and I having problems i.e. the error I get is: "The reference node is not a child of this node". So my existing XML document looks like this: The XML fragment I want to insert after the last LAYER element is: The code I am using is: XmlDocumentFragmen...
Taking into consideration that you need this to work with Framework 2.0, here's another solution: string xml = " 1 2 "; string addMe = " 3 "; XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(xml); XmlDocumentFragment xmlDocFrag = xmlDocument.CreateDocumentFragment(); xmlDocFrag.InnerXml = addMe; XmlE...
Inserting XML Fragment after last specific node/element I want to add an XML fragment to the last element to an XML document and I having problems i.e. the error I get is: "The reference node is not a child of this node". So my existing XML document looks like this: The XML fragment I want to insert after the last LAYE...
TITLE: Inserting XML Fragment after last specific node/element QUESTION: I want to add an XML fragment to the last element to an XML document and I having problems i.e. the error I get is: "The reference node is not a child of this node". So my existing XML document looks like this: The XML fragment I want to insert a...
[ "c#", "xml" ]
4
5
14,672
3
0
2011-05-31T15:08:04.653000
2011-05-31T15:56:07.573000
6,189,669
6,189,748
Handling different types of users in asp.net mvc
I have 3 different types of users (with different roles) interacting on my web application, they all perform some task - some can be exactly the same e.g. create a quote others can be unique to that specific user e.g. sign off quote. For more clarity 3 types of users: Client, Supplier, Customer. Client or Customer can ...
Write a custom MembershipProvider and a Custom RoleProvider then you can decorate your controler class or specific methods with the attribute You can learn how to make that your asp mvc use the custom membershiprovider in this question It's really easy. Edited: The way you did it looks right, but I think you take the l...
Handling different types of users in asp.net mvc I have 3 different types of users (with different roles) interacting on my web application, they all perform some task - some can be exactly the same e.g. create a quote others can be unique to that specific user e.g. sign off quote. For more clarity 3 types of users: Cl...
TITLE: Handling different types of users in asp.net mvc QUESTION: I have 3 different types of users (with different roles) interacting on my web application, they all perform some task - some can be exactly the same e.g. create a quote others can be unique to that specific user e.g. sign off quote. For more clarity 3 ...
[ "c#", "asp.net", "asp.net-mvc" ]
1
4
2,095
2
0
2011-05-31T15:09:17.757000
2011-05-31T15:14:46.180000
6,189,671
6,190,299
How to set SBT default log level to "warn"?
default SBT log level is info (see http://code.google.com/p/simple-build-tool/wiki/RunningSbt ). How do I set it to warn as the default? @Christian: Thanks! Did you get that to work? I modified the sbt.boot.properties accordingly and passed it via: (1) -Dsbt.boot.properties=mysbt.boot.properties (2) -jar /usr/local/Cel...
You could define it in sbt.boot.properties as explained here: sbt wiki
How to set SBT default log level to "warn"? default SBT log level is info (see http://code.google.com/p/simple-build-tool/wiki/RunningSbt ). How do I set it to warn as the default? @Christian: Thanks! Did you get that to work? I modified the sbt.boot.properties accordingly and passed it via: (1) -Dsbt.boot.properties=m...
TITLE: How to set SBT default log level to "warn"? QUESTION: default SBT log level is info (see http://code.google.com/p/simple-build-tool/wiki/RunningSbt ). How do I set it to warn as the default? @Christian: Thanks! Did you get that to work? I modified the sbt.boot.properties accordingly and passed it via: (1) -Dsbt...
[ "scala", "logging", "default", "sbt" ]
9
6
6,734
3
0
2011-05-31T15:09:21.587000
2011-05-31T15:59:29.613000
6,189,685
6,189,791
How can I detect if an HTML email is being opened in Outlook 2007 or 2010?
I am currently trying to write a newsletter for the company I work for. The newsletter appears correctly in all major internet browsers (IE 5.55 to 9, Chrome, Firefox, Opera), but when anyone opens it in Outlook 2007 or 2010, all the fonts look "blown up". I am aware this issue is because of Outlook's way of rendering ...
With previous versions of Outlook (2003 and bellow) you could use the IE CSS hacks, now you can't. And related to your question, you can't detect if it's being viewed with Outlook and even if you did, and as I said, you can't really have conditional styles:( My suggestion is to style the text with pixels (I bet you're ...
How can I detect if an HTML email is being opened in Outlook 2007 or 2010? I am currently trying to write a newsletter for the company I work for. The newsletter appears correctly in all major internet browsers (IE 5.55 to 9, Chrome, Firefox, Opera), but when anyone opens it in Outlook 2007 or 2010, all the fonts look ...
TITLE: How can I detect if an HTML email is being opened in Outlook 2007 or 2010? QUESTION: I am currently trying to write a newsletter for the company I work for. The newsletter appears correctly in all major internet browsers (IE 5.55 to 9, Chrome, Firefox, Opera), but when anyone opens it in Outlook 2007 or 2010, a...
[ "html", "outlook-2007", "html-email", "outlook-2010" ]
3
3
5,417
3
0
2011-05-31T15:10:29.317000
2011-05-31T15:18:02.660000
6,189,688
6,189,747
Insert space when a continuous word is 50 characters long
I want to cut this string into 50 characters where (after a space) it starts counting up to 50 (excluding spaces), and if the section is over 50 it inserts a space. So far, I can cut it up, but I don't know how to specify "exclude spaces". Tried [^\s] but no joy. var str = " http://this.domain.com/fff/222/widget.css ht...
Try this: var str = " http://this.domain.com/fff/222/widget.css http://www.domain.com/myfolder/uploads/1/3/3/7/2332053/custom_themes/8787687678644/more_custom_themes/files/my-main_style.css?8763487634 http://cdn.domain.com/folder/images/thisfolder/common.css?9444" str = str.replace(/([^ ]{50})/g, "$1 ");
Insert space when a continuous word is 50 characters long I want to cut this string into 50 characters where (after a space) it starts counting up to 50 (excluding spaces), and if the section is over 50 it inserts a space. So far, I can cut it up, but I don't know how to specify "exclude spaces". Tried [^\s] but no joy...
TITLE: Insert space when a continuous word is 50 characters long QUESTION: I want to cut this string into 50 characters where (after a space) it starts counting up to 50 (excluding spaces), and if the section is over 50 it inserts a space. So far, I can cut it up, but I don't know how to specify "exclude spaces". Trie...
[ "javascript", "regex", "whitespace" ]
0
2
1,166
3
0
2011-05-31T15:10:51.600000
2011-05-31T15:14:38.787000
6,189,689
6,193,851
Parsing problem H.264 sequence parameter set data
I need to parse image size from raw H.264 data. The following test code works for the cases I testet, but now if fails on "Z0IAIOKQCgDLYC3AQEBpB4kRUA==". Result should be 1280x800, but it gives me 640x1616: public static void main(String[] args) { decode(StringUtils.fromBase64("Z0IAKeKQCgDLYC3AQEBpB4kRUA==")); decode(S...
Perhaps not what you asked for, but have a look in the reference implementation, to see how they do the parsing... Download h.264 parser from http://www.w6rz.net/h264_parse.zip (from this thread @ doom9 http://forum.doom9.org/archive/index.php/t-133070.html ) Download the H.264 reference SW from http://iphome.hhi.de/su...
Parsing problem H.264 sequence parameter set data I need to parse image size from raw H.264 data. The following test code works for the cases I testet, but now if fails on "Z0IAIOKQCgDLYC3AQEBpB4kRUA==". Result should be 1280x800, but it gives me 640x1616: public static void main(String[] args) { decode(StringUtils.fro...
TITLE: Parsing problem H.264 sequence parameter set data QUESTION: I need to parse image size from raw H.264 data. The following test code works for the cases I testet, but now if fails on "Z0IAIOKQCgDLYC3AQEBpB4kRUA==". Result should be 1280x800, but it gives me 640x1616: public static void main(String[] args) { deco...
[ "java", "parsing", "h.264" ]
3
3
5,842
4
0
2011-05-31T15:10:53.240000
2011-05-31T21:36:07.233000
6,189,690
6,284,747
Root element in axis2.xml
So I'm really hoping this question will be closed as obvious and I just don't know where to look. I looked in the axis2 documentation but I cannot find what to call the root element in axis2.xml
After placing this bounty I found this blog post which stated it is.
Root element in axis2.xml So I'm really hoping this question will be closed as obvious and I just don't know where to look. I looked in the axis2 documentation but I cannot find what to call the root element in axis2.xml
TITLE: Root element in axis2.xml QUESTION: So I'm really hoping this question will be closed as obvious and I just don't know where to look. I looked in the axis2 documentation but I cannot find what to call the root element in axis2.xml ANSWER: After placing this bounty I found this blog post which stated it is.
[ "java", "apache-axis" ]
0
0
218
1
0
2011-05-31T15:10:55.763000
2011-06-08T20:19:27.560000
6,189,698
6,189,800
PHP 5.3 Use and Symfony Forms
Im trying to include some Symfony form components into my project. use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; If I do this I get: Fatal error: Class 'Symfony\Component\Form\Form' not found Even though I know that this is where the Form elements are. Using require 'Symfony\Component\Form\...
You need to set up autoloading. The 'use' does not do that for you. To do this, include the UniversalClassLoader, tell it where to load the Symfony files from and register it. require_once __DIR__.'/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php'; use Symfony\Component\ClassLoader\UniversalClassLoader; ...
PHP 5.3 Use and Symfony Forms Im trying to include some Symfony form components into my project. use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; If I do this I get: Fatal error: Class 'Symfony\Component\Form\Form' not found Even though I know that this is where the Form elements are. Using re...
TITLE: PHP 5.3 Use and Symfony Forms QUESTION: Im trying to include some Symfony form components into my project. use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; If I do this I get: Fatal error: Class 'Symfony\Component\Form\Form' not found Even though I know that this is where the Form elem...
[ "php", "autoload", "symfony" ]
4
6
2,132
2
0
2011-05-31T15:11:24.347000
2011-05-31T15:19:25.247000
6,189,700
6,189,763
What is a better way to handle exceptions than the following?
At first, I was going to do something like the following: public void WriteToFile(string filePath, string contents) { try { File.WriteAllText(filePath, contents) } catch(Exception ex) { //Log error } } But then I decided to catch all the specific exceptions for the method WriteAllText, like the following: public void W...
It depends on how you are handling the exception. For example, if a SecurityException will cause you to present a dialog to the user to provide their credentials, then you should have a separate catch clause. If not, there is no need to explicitly call them all out. E.g. try { File.WriteAllText(filePath, contents); } c...
What is a better way to handle exceptions than the following? At first, I was going to do something like the following: public void WriteToFile(string filePath, string contents) { try { File.WriteAllText(filePath, contents) } catch(Exception ex) { //Log error } } But then I decided to catch all the specific exceptions ...
TITLE: What is a better way to handle exceptions than the following? QUESTION: At first, I was going to do something like the following: public void WriteToFile(string filePath, string contents) { try { File.WriteAllText(filePath, contents) } catch(Exception ex) { //Log error } } But then I decided to catch all the sp...
[ "c#", "exception" ]
2
2
2,434
4
0
2011-05-31T15:11:31.727000
2011-05-31T15:16:02.457000
6,189,704
6,189,730
How to take a valid sublist in Java?
I have this weird (I think) problem in Java. I have an ArrayList and I want to take a sublist. But I get the follow exception. package javatest; import java.util.ArrayList; public class JavaTest { public static void main(String[] args) { ArrayList alist = new ArrayList (); alist.add(10); alist.add(20); alist.add(30)...
You should work with the interfaces for Collections wherever possible. You're downcasting the result of sublist, but the API specifies that it returns List ( not ArrayList ). Here, the implementors are choosing to return a different type to make their lives easier. Furthemore, the API documentation specifies that subli...
How to take a valid sublist in Java? I have this weird (I think) problem in Java. I have an ArrayList and I want to take a sublist. But I get the follow exception. package javatest; import java.util.ArrayList; public class JavaTest { public static void main(String[] args) { ArrayList alist = new ArrayList (); alist....
TITLE: How to take a valid sublist in Java? QUESTION: I have this weird (I think) problem in Java. I have an ArrayList and I want to take a sublist. But I get the follow exception. package javatest; import java.util.ArrayList; public class JavaTest { public static void main(String[] args) { ArrayList alist = new Ar...
[ "java", "arraylist", "sublist" ]
26
24
43,927
6
0
2011-05-31T15:11:39.537000
2011-05-31T15:13:24.453000
6,189,708
6,189,752
Subjective usages of 'this' in C#
I come from C++ and normally this is rarely used compared to C#. In my experience, the usage of this is strictly limited to scope and/or name resolution. I have coworkers that insist that using this everywhere makes code "more clear". They essentially depend on it for documentation purposes. I disagree with this usage ...
If they want to distinguish static variables from private instance variables, why not use a naming convention to distinguish the two, instead of requiring this? For example, for private instance variables, prefix them with an underscore and name them using camel case (e.g. _myVariable ). Then, for static variables, use...
Subjective usages of 'this' in C# I come from C++ and normally this is rarely used compared to C#. In my experience, the usage of this is strictly limited to scope and/or name resolution. I have coworkers that insist that using this everywhere makes code "more clear". They essentially depend on it for documentation pur...
TITLE: Subjective usages of 'this' in C# QUESTION: I come from C++ and normally this is rarely used compared to C#. In my experience, the usage of this is strictly limited to scope and/or name resolution. I have coworkers that insist that using this everywhere makes code "more clear". They essentially depend on it for...
[ "c#", "documentation", "this" ]
0
2
107
2
0
2011-05-31T15:11:52.710000
2011-05-31T15:15:11.633000
6,189,720
6,189,797
aspx unable to locate code behind
I am able to execute my application fine using the Visual Studio IDE but when I create a release package and put it on the web server it can’t seem to find the code behind. However, if I copy the bin folder (which has the dll files) from the root directory and put it into the “root/reports” directory, everything works ...
Since you have published your website, that means your code files were compiled into a DLL. To work properly you have to put your DLL's into the bin folder on your host server. For Details, Check this link: An Overview of ASP.NET Code Generation and Compilation
aspx unable to locate code behind I am able to execute my application fine using the Visual Studio IDE but when I create a release package and put it on the web server it can’t seem to find the code behind. However, if I copy the bin folder (which has the dll files) from the root directory and put it into the “root/rep...
TITLE: aspx unable to locate code behind QUESTION: I am able to execute my application fine using the Visual Studio IDE but when I create a release package and put it on the web server it can’t seem to find the code behind. However, if I copy the bin folder (which has the dll files) from the root directory and put it ...
[ "c#", ".net", "asp.net", "iis", "dll" ]
0
6
1,110
1
0
2011-05-31T15:12:50.267000
2011-05-31T15:18:59.033000
6,189,724
6,189,770
Interview Questions (in C#)
So I was given a small program to write, which I did well but then I was asked the following and I was a bit confused. What are the values of the following? // I told them that they would get an error as they are not initialized, so they are pointing to some address in memory... int a; Object b; int d = a; bool c; if i...
The.Net CLR initializes all fields and locals to their default values. In your case, that's 0, null, and false. However, this code will not compile under any circumstances. Inside a method, C# will not allow you to use uninitialized locals, so d = b will not compile. As instance fields, C# does not allow you to use thi...
Interview Questions (in C#) So I was given a small program to write, which I did well but then I was asked the following and I was a bit confused. What are the values of the following? // I told them that they would get an error as they are not initialized, so they are pointing to some address in memory... int a; Objec...
TITLE: Interview Questions (in C#) QUESTION: So I was given a small program to write, which I did well but then I was asked the following and I was a bit confused. What are the values of the following? // I told them that they would get an error as they are not initialized, so they are pointing to some address in memo...
[ "java", "c#-4.0", "c#-3.0" ]
0
6
343
3
0
2011-05-31T15:13:01.243000
2011-05-31T15:16:35.540000
6,189,728
6,189,832
Render form partial in a different controller (not nested)
I have two models generated with generate scaffolding, one is a LogBook the other is LogEntry. I want to render the form partial for LogEntry on the LogBook show page. When I call render on the partial I get this error: undefined method `model_name' for NilClass:Class I assume it is because the default _form uses an in...
You can render whatever partial you want as long as you give it's path from the view folder: <%= render:partial => '/log_entries/form',:log_entry => @log_book.log_entries.build %> Your path must begin with a / to let Rails know you're relative to the view folder. Otherwise it's assumed to be relative to your current fo...
Render form partial in a different controller (not nested) I have two models generated with generate scaffolding, one is a LogBook the other is LogEntry. I want to render the form partial for LogEntry on the LogBook show page. When I call render on the partial I get this error: undefined method `model_name' for NilClas...
TITLE: Render form partial in a different controller (not nested) QUESTION: I have two models generated with generate scaffolding, one is a LogBook the other is LogEntry. I want to render the form partial for LogEntry on the LogBook show page. When I call render on the partial I get this error: undefined method `model...
[ "ruby-on-rails", "ruby-on-rails-3", "partials" ]
15
38
25,490
2
0
2011-05-31T15:13:16.697000
2011-05-31T15:22:00.633000
6,189,731
6,190,268
How to know who is connected to a Tibco EMS Queue
We are using a Tibco EMS Queue to send messages. We are the publisher. Whenever we are publishing messages it seems someone is consuming that. When we asked the other team who is subscribing, they said they are not consuming. Is it possible to know to who is connected to the EMS Queue and consuming the messages?
If you've got access to the EMS dashboard utility then bring up the view of all queues on the server, then right-click on the queue you're interested in and select "Consumers" and it will give you a detailed view of who is attached to a queue. If you don't have the dashboard app then you'll probably need to hassle your...
How to know who is connected to a Tibco EMS Queue We are using a Tibco EMS Queue to send messages. We are the publisher. Whenever we are publishing messages it seems someone is consuming that. When we asked the other team who is subscribing, they said they are not consuming. Is it possible to know to who is connected t...
TITLE: How to know who is connected to a Tibco EMS Queue QUESTION: We are using a Tibco EMS Queue to send messages. We are the publisher. Whenever we are publishing messages it seems someone is consuming that. When we asked the other team who is subscribing, they said they are not consuming. Is it possible to know to ...
[ "c#", "producer-consumer", "tibco", "tibco-ems", "ems" ]
3
5
6,067
5
0
2011-05-31T15:13:26.013000
2011-05-31T15:56:40.133000
6,189,740
6,197,488
Hiding TcxGridLevel in TCXGrid depending on master record values
I have a TcxGrid which consists of a master TcxGridLevel and 2 child TcxGridLevels (all of which use a TcxGridDBTableView). I would like to hide one of the child levels depending on the value of the master level record values. How do I go about this?
Here is a link to DevExpress describing what you want: https://www.devexpress.com/Support/Center/Question/Details/Q96738 But this has some disadvantages in my opinion. First it is quite slow with bigger datasets. Second it comes to "flicker" when your master level changes frequently and the grid has to be redrawn. Mayb...
Hiding TcxGridLevel in TCXGrid depending on master record values I have a TcxGrid which consists of a master TcxGridLevel and 2 child TcxGridLevels (all of which use a TcxGridDBTableView). I would like to hide one of the child levels depending on the value of the master level record values. How do I go about this?
TITLE: Hiding TcxGridLevel in TCXGrid depending on master record values QUESTION: I have a TcxGrid which consists of a master TcxGridLevel and 2 child TcxGridLevels (all of which use a TcxGridDBTableView). I would like to hide one of the child levels depending on the value of the master level record values. How do I g...
[ "delphi", "devexpress", "tcxgrid" ]
1
3
3,813
1
0
2011-05-31T15:14:13.973000
2011-06-01T07:09:07.613000
6,189,750
6,189,812
Sorting IComparable objects some of which are null
Most people, when writing a refence type (class) which implements IComparable, use the convention that null is LESS than any actual object. But if you try to use the opposite convention, something interesting happens: using System; using System.Collections.Generic; namespace SortingNulls { internal class Child: ICompa...
No, this is not a bug. Your CompareTo method which implements IComparable is defined on your Child class. In other words, if you have to invoke a method on one of your types in order to make a comparison. If one of the Child items being compared is null, how can you invoke CompareTo on it? Note that from the definition...
Sorting IComparable objects some of which are null Most people, when writing a refence type (class) which implements IComparable, use the convention that null is LESS than any actual object. But if you try to use the opposite convention, something interesting happens: using System; using System.Collections.Generic; na...
TITLE: Sorting IComparable objects some of which are null QUESTION: Most people, when writing a refence type (class) which implements IComparable, use the convention that null is LESS than any actual object. But if you try to use the opposite convention, something interesting happens: using System; using System.Collec...
[ "c#", ".net", "null", "icomparable" ]
7
11
4,187
4
0
2011-05-31T15:14:56.063000
2011-05-31T15:20:38.637000
6,189,755
6,190,156
Multiple canvases in a view
I have overridden the onDraw() method as follows: public void onDraw(Canvas canvas1){ Canvas canvas2 = new Canvas(); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.graphic1); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.graphic2); canvas1.drawBitmap( top, new Rect(0...
As the comment said you're not attaching Canvas2 to anything. You're creating it each frame (which is bad), drawing to it and then letting it go our of scope to be garbage collected. What you should do it create Canvas2 with a backing Bitmap in the constructor of your view and keep it as a member. Then you can draw to ...
Multiple canvases in a view I have overridden the onDraw() method as follows: public void onDraw(Canvas canvas1){ Canvas canvas2 = new Canvas(); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.graphic1); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.graphic2); canvas1...
TITLE: Multiple canvases in a view QUESTION: I have overridden the onDraw() method as follows: public void onDraw(Canvas canvas1){ Canvas canvas2 = new Canvas(); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.graphic1); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.g...
[ "android", "view", "canvas", "bitmap" ]
3
3
7,447
1
0
2011-05-31T15:15:35.737000
2011-05-31T15:47:10.350000
6,189,765
6,189,930
Big O complexities of algorithms - LZW and Huffman
What are the space and time complexities, in Big O notation, for the Lempel-Ziv-Welch and Huffman compression algorithms? Google is failing me. Thanks, Francisco
As the dictionary size is fixed and independent of the input length, LZW is in O( n ) as each byte is only read once and the complexity of the operation for each character is constant. And Huffman encoding is also in O( n ): First you count the number of occurrences for each input byte, then you sort it and build the o...
Big O complexities of algorithms - LZW and Huffman What are the space and time complexities, in Big O notation, for the Lempel-Ziv-Welch and Huffman compression algorithms? Google is failing me. Thanks, Francisco
TITLE: Big O complexities of algorithms - LZW and Huffman QUESTION: What are the space and time complexities, in Big O notation, for the Lempel-Ziv-Welch and Huffman compression algorithms? Google is failing me. Thanks, Francisco ANSWER: As the dictionary size is fixed and independent of the input length, LZW is in O...
[ "algorithm", "compression", "big-o", "time-complexity", "space-complexity" ]
12
10
10,911
2
0
2011-05-31T15:16:11.663000
2011-05-31T15:29:43.270000
6,189,771
6,189,942
convert backslashes to forward in batch files
whats the easiest way of converting all backslashes to forward in a path in a batch file, since I need to use bash for execution.
SET "string=D:\path\to\folder" ECHO %string:\=/% Basically, you need first to store the string value into an environment variable, then use the following template: % variable: str1 = str2 % to replace every occurrence of str1 in variable with str2. You can always remind yourself about this pattern by invoking SET /? fr...
convert backslashes to forward in batch files whats the easiest way of converting all backslashes to forward in a path in a batch file, since I need to use bash for execution.
TITLE: convert backslashes to forward in batch files QUESTION: whats the easiest way of converting all backslashes to forward in a path in a batch file, since I need to use bash for execution. ANSWER: SET "string=D:\path\to\folder" ECHO %string:\=/% Basically, you need first to store the string value into an environm...
[ "bash", "batch-file" ]
10
26
14,114
2
0
2011-05-31T15:16:45.133000
2011-05-31T15:31:03.847000
6,189,781
6,189,908
Why does Run.Text bind two-way by default?
In.NET 4.0, Run.Text is bindable. So I tried to bind it: But when I ran, I got an error: "A TwoWay or OneWayToSource binding cannot work on the read-only property 'DisplayText' of type 'SomeNamespace.SomeClass'." My DisplayText property was indeed read-only, but so is a Run -- Runs go in in TextBlocks, which you can't ...
Just a guess here: It might be because Run objects are also used in the RichTextBox control, and I can imagine this control might want to Bind TwoWay by default!
Why does Run.Text bind two-way by default? In.NET 4.0, Run.Text is bindable. So I tried to bind it: But when I ran, I got an error: "A TwoWay or OneWayToSource binding cannot work on the read-only property 'DisplayText' of type 'SomeNamespace.SomeClass'." My DisplayText property was indeed read-only, but so is a Run --...
TITLE: Why does Run.Text bind two-way by default? QUESTION: In.NET 4.0, Run.Text is bindable. So I tried to bind it: But when I ran, I got an error: "A TwoWay or OneWayToSource binding cannot work on the read-only property 'DisplayText' of type 'SomeNamespace.SomeClass'." My DisplayText property was indeed read-only, ...
[ "c#", "wpf", "binding" ]
32
9
1,514
1
0
2011-05-31T15:17:29.060000
2011-05-31T15:27:20.943000
6,189,782
6,192,804
C# XNA Matrices - Calculate moon rotation around axis with matrices
I am building a 3D simulation. I am using one class to display sun, planets & moon with different size, texture, speed and orbit. Here's my code which does the magic job of calculating rotation + revolution world = Matrix.CreateScale(size,size,size) * Matrix.CreateTranslation(0,0,0) * Matrix.CreateRotationY(rotation) *...
i figured it out... Translate The Origin to the Parent planet's Current Location and keep doing it in the update method world = Matrix.CreateScale(size,size,size) * Matrix.CreateTranslation(0,0,0) * Matrix.CreateRotationY(rotation) * Matrix.CreateTranslation(position) * Matrix.CreateRotationY(revolution); world *= Mat...
C# XNA Matrices - Calculate moon rotation around axis with matrices I am building a 3D simulation. I am using one class to display sun, planets & moon with different size, texture, speed and orbit. Here's my code which does the magic job of calculating rotation + revolution world = Matrix.CreateScale(size,size,size) * ...
TITLE: C# XNA Matrices - Calculate moon rotation around axis with matrices QUESTION: I am building a 3D simulation. I am using one class to display sun, planets & moon with different size, texture, speed and orbit. Here's my code which does the magic job of calculating rotation + revolution world = Matrix.CreateScale(...
[ "c#", "math", "matrix", "xna", "matrix-multiplication" ]
1
0
2,371
2
0
2011-05-31T15:17:29.293000
2011-05-31T19:55:17.880000
6,189,787
6,189,841
Error compiling MVC 3 project after adding FacebookWebMvc Nuget Package
I added the FacebookWebMvc Nuget package to my MVC 3 Web Application project and then created the following controller: public ActionResult FacebookLogOn(string returnUrl) { if (!FacebookWebContext.Current.IsAuthenticated()) { throw new Exception("Please log into facebook"); } } When I try to compile, I get this error ...
Just remove a reference to Facebook.Web.Contracts.dll from your project.
Error compiling MVC 3 project after adding FacebookWebMvc Nuget Package I added the FacebookWebMvc Nuget package to my MVC 3 Web Application project and then created the following controller: public ActionResult FacebookLogOn(string returnUrl) { if (!FacebookWebContext.Current.IsAuthenticated()) { throw new Exception("...
TITLE: Error compiling MVC 3 project after adding FacebookWebMvc Nuget Package QUESTION: I added the FacebookWebMvc Nuget package to my MVC 3 Web Application project and then created the following controller: public ActionResult FacebookLogOn(string returnUrl) { if (!FacebookWebContext.Current.IsAuthenticated()) { thr...
[ "c#", "asp.net-mvc", "facebook-c#-sdk", "nuget" ]
1
2
297
1
0
2011-05-31T15:17:43.800000
2011-05-31T15:22:31.230000
6,189,793
6,189,845
In php we have to loop or any special thing to do this?
php> $a = array("a"=>1,"b"=>0,"c"=>1,"d"=>1,"e"=>0); php> $b = array(); php> foreach ($a as $k =>$v){... if($v!= 0){... $b["$k"] = $v;... }... } php> print_r($b); Array ( [a] => 1 [c] => 1 [d] => 1 ) php> Anyways to do it not using loop?
I think that array_filter is what you need. function notZero($var) { // returns whether the input integer is not zero return $var!= 0; } $a = array("a"=>1,"b"=>0,"c"=>1,"d"=>1,"e"=>0); print_r(array_filter($a, "notZero")); //Prints what you need Array ( [a] => 1 [c] => 1 [d] => 1 )
In php we have to loop or any special thing to do this? php> $a = array("a"=>1,"b"=>0,"c"=>1,"d"=>1,"e"=>0); php> $b = array(); php> foreach ($a as $k =>$v){... if($v!= 0){... $b["$k"] = $v;... }... } php> print_r($b); Array ( [a] => 1 [c] => 1 [d] => 1 ) php> Anyways to do it not using loop?
TITLE: In php we have to loop or any special thing to do this? QUESTION: php> $a = array("a"=>1,"b"=>0,"c"=>1,"d"=>1,"e"=>0); php> $b = array(); php> foreach ($a as $k =>$v){... if($v!= 0){... $b["$k"] = $v;... }... } php> print_r($b); Array ( [a] => 1 [c] => 1 [d] => 1 ) php> Anyways to do it not using loop? ANS...
[ "php" ]
2
4
70
4
0
2011-05-31T15:18:13.307000
2011-05-31T15:22:39.790000
6,189,798
6,189,964
Problem with testing iOS App on device
Yesterday I made myself a new my first App ID, all Certificates and downloaded and installed them. (As shown in the videos). As I wanted to test my App on my device (I set it up in the Organizer) I got an Error: Validation[28932:607] *** Warning: Defaulting to the standard codesign tool warning: Unable to extract entit...
That's not a message I'm familiar with but a couple of suggestions;- Make sure you are using the debug and device configuration (assuming you've not changed them from the template) when compiling and deploying during development. The file path above seems to suggest you are using a release configuration which is really...
Problem with testing iOS App on device Yesterday I made myself a new my first App ID, all Certificates and downloaded and installed them. (As shown in the videos). As I wanted to test my App on my device (I set it up in the Organizer) I got an Error: Validation[28932:607] *** Warning: Defaulting to the standard codesig...
TITLE: Problem with testing iOS App on device QUESTION: Yesterday I made myself a new my first App ID, all Certificates and downloaded and installed them. (As shown in the videos). As I wanted to test my App on my device (I set it up in the Organizer) I got an Error: Validation[28932:607] *** Warning: Defaulting to th...
[ "iphone", "xcode", "testing", "code-signing-entitlements" ]
0
0
1,047
1
0
2011-05-31T15:18:59.807000
2011-05-31T15:32:36.520000
6,189,804
6,190,199
inserted value into model, with SelectWithPop, but page is not updated unless I restart the server
So, I've a form with SelectWithPop. So the user can select a variable or he can add one more. A new page is open for the user to enter data. My problem is that I'm able to insert a new variable into the model but when I return to the page to select a value, the new value is not shown until I restart the server. Is this...
put the code that gets the hospital queryset into the forms init. e.g..... hosp = forms.ChoiceField(widget=SelectWithPop(), label="Hospital", required=False) def __init__(self, *args, **kwargs): super(CheckPatForm, self).__init__(*args, **kwargs) names = list(Hospital.objects.values_list('hospital_id', 'hospital_name...
inserted value into model, with SelectWithPop, but page is not updated unless I restart the server So, I've a form with SelectWithPop. So the user can select a variable or he can add one more. A new page is open for the user to enter data. My problem is that I'm able to insert a new variable into the model but when I r...
TITLE: inserted value into model, with SelectWithPop, but page is not updated unless I restart the server QUESTION: So, I've a form with SelectWithPop. So the user can select a variable or he can add one more. A new page is open for the user to enter data. My problem is that I'm able to insert a new variable into the ...
[ "django", "django-forms", "django-views" ]
0
0
118
1
0
2011-05-31T15:19:41.923000
2011-05-31T15:51:00.780000
6,189,805
6,204,655
JSON array returns empty using appcelerator/titanium
I'm writing an iPhone app at the moment using Appcelerator's Titanium. One of the requirements of the app is to be able to retrieve a JSON array of recently played songs, and display this in a tableView. I have a separate tab in the app that parses JSON from twitter without a problem, however no matter what I do, I can...
Thanks for the answers everyone. I have investigated further and found that the problem seemed to lie with the way my PHP script was creating the JSON array. Although the JSON validated, and was visible both in the browser and in the.json file I was generating, for some reason it wasn't being created? Really strange, a...
JSON array returns empty using appcelerator/titanium I'm writing an iPhone app at the moment using Appcelerator's Titanium. One of the requirements of the app is to be able to retrieve a JSON array of recently played songs, and display this in a tableView. I have a separate tab in the app that parses JSON from twitter ...
TITLE: JSON array returns empty using appcelerator/titanium QUESTION: I'm writing an iPhone app at the moment using Appcelerator's Titanium. One of the requirements of the app is to be able to retrieve a JSON array of recently played songs, and display this in a tableView. I have a separate tab in the app that parses ...
[ "php", "javascript", "json", "titanium", "appcelerator" ]
1
1
3,040
4
0
2011-05-31T15:19:45.410000
2011-06-01T16:37:45.120000
6,189,816
6,191,278
Can the .NET ClickOnce downloader pull files from a site protected by a PIN-requiring client certificate?
(I tried this over a year ago using an older (than 4.0; I don't recall exactly which) version of the.NET framework. The non-browser downloader wasn't capable (to my knowledge) of negotiating the client certificate requirement. I'm considering ClickOnce for another deployment now, with.NET 4.0, and I don't have the reso...
I think this will be a problem. It's possible if the user is using IE that it'll reuse a saved session, but I wouldn't count on it and haven't tested it. You can always have the link to the app.manifest file on the protected site, but host actually click-once files on a separate server. We host ours in Amazon S3 actual...
Can the .NET ClickOnce downloader pull files from a site protected by a PIN-requiring client certificate? (I tried this over a year ago using an older (than 4.0; I don't recall exactly which) version of the.NET framework. The non-browser downloader wasn't capable (to my knowledge) of negotiating the client certificate ...
TITLE: Can the .NET ClickOnce downloader pull files from a site protected by a PIN-requiring client certificate? QUESTION: (I tried this over a year ago using an older (than 4.0; I don't recall exactly which) version of the.NET framework. The non-browser downloader wasn't capable (to my knowledge) of negotiating the c...
[ ".net", "clickonce", "download", "client-certificates" ]
2
0
311
1
0
2011-05-31T15:20:53.417000
2011-05-31T17:32:39.593000
6,189,819
6,190,190
Do I need to release this object?
Do I have to release the returnSet variable? NSMutableSet* returnSet = [[NSMutableSet alloc] init]; for (Information* currentInformation in self.information) { if ([currentInformation.player isEqual:aPlayer]) { [returnSet addObject:currentInformation]; } } return [NSSet setWithSet:returnSet]; Thanks for your answers, C...
Generally when writing a method that returns a newly created object (as in your example), you should return an auto-released object. So, to follow convention, your code would become: NSMutableSet* returnSet = [[NSMutableSet alloc] init]; for (Information* currentInformation in self.information) { if ([currentInformatio...
Do I need to release this object? Do I have to release the returnSet variable? NSMutableSet* returnSet = [[NSMutableSet alloc] init]; for (Information* currentInformation in self.information) { if ([currentInformation.player isEqual:aPlayer]) { [returnSet addObject:currentInformation]; } } return [NSSet setWithSet:retu...
TITLE: Do I need to release this object? QUESTION: Do I have to release the returnSet variable? NSMutableSet* returnSet = [[NSMutableSet alloc] init]; for (Information* currentInformation in self.information) { if ([currentInformation.player isEqual:aPlayer]) { [returnSet addObject:currentInformation]; } } return [NSS...
[ "iphone", "xcode", "ios", "memory-management" ]
0
4
774
6
0
2011-05-31T15:21:08.137000
2011-05-31T15:50:18.150000
6,189,831
6,194,518
What's the purpose of using sendto()/recvfrom() instead of connect()/send()/recv() with UDP sockets?
I can grasp the concept of TCP vs UDP, but still I don't know why are there 2 ways of sending UDP packets, and with that I still don't understand if this is absolutely necessary to bind() and accept()...
accept() is for TCP. It has nothing to do with UDP. connect() in UDP doesn't do anything to the other end, it just conditions the local API to know who you are sending to and receiving from. If you don't already know that, or don't care, or want to send to multiple destinations with the same socket, you don't use conne...
What's the purpose of using sendto()/recvfrom() instead of connect()/send()/recv() with UDP sockets? I can grasp the concept of TCP vs UDP, but still I don't know why are there 2 ways of sending UDP packets, and with that I still don't understand if this is absolutely necessary to bind() and accept()...
TITLE: What's the purpose of using sendto()/recvfrom() instead of connect()/send()/recv() with UDP sockets? QUESTION: I can grasp the concept of TCP vs UDP, but still I don't know why are there 2 ways of sending UDP packets, and with that I still don't understand if this is absolutely necessary to bind() and accept()....
[ "sockets", "networking", "network-programming", "udp" ]
44
70
41,490
2
0
2011-05-31T15:21:44.207000
2011-05-31T23:00:05.447000
6,189,834
6,190,292
WIF Ntier Authentication
I have a basic 3 tier app Presentation/Web (ASP.NET MVC) Application Services (WCF, hosted in IIS) Database (SQL) I am trying to authenticate the user against any and all tiers using WIF. At the moment I have authenticated the user against the Web (MVC). How do I pass the users token through to the next teir? PS I am u...
If you want to preserve the original user identity on the WCF services, then your web site will have to request a token to an STS on behalf of that user. The input for requesting an "Act As" token is the orignal token sent to the 1st tier (the MVC app). Not all STSs support the "ActAs" request, so you need to double ch...
WIF Ntier Authentication I have a basic 3 tier app Presentation/Web (ASP.NET MVC) Application Services (WCF, hosted in IIS) Database (SQL) I am trying to authenticate the user against any and all tiers using WIF. At the moment I have authenticated the user against the Web (MVC). How do I pass the users token through to...
TITLE: WIF Ntier Authentication QUESTION: I have a basic 3 tier app Presentation/Web (ASP.NET MVC) Application Services (WCF, hosted in IIS) Database (SQL) I am trying to authenticate the user against any and all tiers using WIF. At the moment I have authenticated the user against the Web (MVC). How do I pass the user...
[ ".net", "n-tier-architecture", "wif" ]
0
1
144
1
0
2011-05-31T15:22:04.860000
2011-05-31T15:59:13.330000
6,189,838
6,189,882
XHTML text in XML formatted with XSLT
I'm trying to create an XML file with a corresponding XSLT stylesheet. Everything sort of works okay, but......the nodes I'm outputting contain XHTML text inside them, like so: Some title here Blah blah blah...... Here's the corresponding XSLT stylesheet: The issue I'm having, is that the h1 and p tags are not printed ...
Try xsl:copy-of instead of xsl:value-of. That should give you the nodes instead of the nodes as text.
XHTML text in XML formatted with XSLT I'm trying to create an XML file with a corresponding XSLT stylesheet. Everything sort of works okay, but......the nodes I'm outputting contain XHTML text inside them, like so: Some title here Blah blah blah...... Here's the corresponding XSLT stylesheet: The issue I'm having, is t...
TITLE: XHTML text in XML formatted with XSLT QUESTION: I'm trying to create an XML file with a corresponding XSLT stylesheet. Everything sort of works okay, but......the nodes I'm outputting contain XHTML text inside them, like so: Some title here Blah blah blah...... Here's the corresponding XSLT stylesheet: The issu...
[ "xml", "xslt" ]
0
2
195
1
0
2011-05-31T15:22:24.553000
2011-05-31T15:24:56.940000
6,189,858
6,190,011
Saving XML File with c# and keep the format of empty element
I am trying to figure out how I can keep the XML format intact. Ex) I have an empty element that when I save the file to a new file it adds the element like so: Instead I want it to save like: My code: XmlDocument myXmlDocument = new XmlDocument(); myXmlDocument.Load(@"C:\t1.xml"); XmlNode node; node = myXmlDocument.D...
This should keep your whitespace the way you want it. myXmlDocument.Save(@"C:\t2.xml", SaveOptions.DisableFormatting);
Saving XML File with c# and keep the format of empty element I am trying to figure out how I can keep the XML format intact. Ex) I have an empty element that when I save the file to a new file it adds the element like so: Instead I want it to save like: My code: XmlDocument myXmlDocument = new XmlDocument(); myXmlDocum...
TITLE: Saving XML File with c# and keep the format of empty element QUESTION: I am trying to figure out how I can keep the XML format intact. Ex) I have an empty element that when I save the file to a new file it adds the element like so: Instead I want it to save like: My code: XmlDocument myXmlDocument = new XmlDocu...
[ "c#", ".net", "xml" ]
2
3
2,161
1
0
2011-05-31T15:23:28.297000
2011-05-31T15:36:26.703000
6,189,859
6,189,883
Control custom properties
I'm just learning about custom controls in C# (window forms) I've created the below custom control, as you can see I have a propery called "Test" that should be set to an enum value of EnumTest - it's working find, except what I would like is for the user of the control to select more than one property so the "Test" pr...
Add [Flags] to your enum to indicate that it accepts multiple values. I don't remember whether the property grid is aware of [Flags] enums; if not, you'll need to write a UITypeEditor.
Control custom properties I'm just learning about custom controls in C# (window forms) I've created the below custom control, as you can see I have a propery called "Test" that should be set to an enum value of EnumTest - it's working find, except what I would like is for the user of the control to select more than one...
TITLE: Control custom properties QUESTION: I'm just learning about custom controls in C# (window forms) I've created the below custom control, as you can see I have a propery called "Test" that should be set to an enum value of EnumTest - it's working find, except what I would like is for the user of the control to se...
[ "c#", "winforms", "enums", "controls" ]
2
2
917
2
0
2011-05-31T15:23:28.653000
2011-05-31T15:25:01.930000
6,189,867
6,197,475
PieChart is not displaying anything
I have a Ext.chart.Chart of the type "Pie" and i have a store with autoload and data like this: [ {name: 'Firefox', value: 50} {name: 'IE', value: 30} {name: 'Safari', value: 10} {name: 'Others', value: 10} ] the "field" property of the Chart is "value". The complete Chart Object is then added to a Panel on the site. I...
I had to do "doComponentLayout()", with and give a fixed with and height. Otherwise the PieChart won't show up.
PieChart is not displaying anything I have a Ext.chart.Chart of the type "Pie" and i have a store with autoload and data like this: [ {name: 'Firefox', value: 50} {name: 'IE', value: 30} {name: 'Safari', value: 10} {name: 'Others', value: 10} ] the "field" property of the Chart is "value". The complete Chart Object is ...
TITLE: PieChart is not displaying anything QUESTION: I have a Ext.chart.Chart of the type "Pie" and i have a store with autoload and data like this: [ {name: 'Firefox', value: 50} {name: 'IE', value: 30} {name: 'Safari', value: 10} {name: 'Others', value: 10} ] the "field" property of the Chart is "value". The complet...
[ "extjs", "extjs4" ]
1
1
1,893
1
0
2011-05-31T15:24:11.710000
2011-06-01T07:07:42.950000
6,189,868
6,189,914
Public elements in interface implementation
I have this interface and a class implementing it: interface Scraper { string DateToUrl(DateTime date); } class ScraperA: Scraper { string Scraper.DateToUrl(DateTime date) { return "some string based on date"; } } I'd like to test it. I try to add this method to ScraperA: public void JustATest() { DateTime date = new ...
By prefixing the method name with Scraper in the declaration you're implementing the interface explicitly. This means that the method is essentially invisible unless it's called via the Scraper interface. Your options: Remove the Scraper prefix in the declaration. The method can then be called normally: public string D...
Public elements in interface implementation I have this interface and a class implementing it: interface Scraper { string DateToUrl(DateTime date); } class ScraperA: Scraper { string Scraper.DateToUrl(DateTime date) { return "some string based on date"; } } I'd like to test it. I try to add this method to ScraperA: pu...
TITLE: Public elements in interface implementation QUESTION: I have this interface and a class implementing it: interface Scraper { string DateToUrl(DateTime date); } class ScraperA: Scraper { string Scraper.DateToUrl(DateTime date) { return "some string based on date"; } } I'd like to test it. I try to add this meth...
[ "c#", "interface" ]
2
5
139
2
0
2011-05-31T15:24:12.913000
2011-05-31T15:28:00.540000
6,189,874
6,189,922
Process.Kill() vs Process.Start("taskkill",...)
I've a small C# installer application and I want to kill a process. Are there any advantages / differences in using Process[] procs = Process.GetProcessesByName("[taskname]"); foreach (Process p in procs) { p.Kill(); } vs Process.Start("taskkill", "/F /IM [taskname].exe"); I read somewhere that using "taskkill" is only...
Process.Kill is prefered, because you are not starting another process as you do, when you start taskkill to kill the process. It is just a lot of useless overhead.
Process.Kill() vs Process.Start("taskkill",...) I've a small C# installer application and I want to kill a process. Are there any advantages / differences in using Process[] procs = Process.GetProcessesByName("[taskname]"); foreach (Process p in procs) { p.Kill(); } vs Process.Start("taskkill", "/F /IM [taskname].exe")...
TITLE: Process.Kill() vs Process.Start("taskkill",...) QUESTION: I've a small C# installer application and I want to kill a process. Are there any advantages / differences in using Process[] procs = Process.GetProcessesByName("[taskname]"); foreach (Process p in procs) { p.Kill(); } vs Process.Start("taskkill", "/F /I...
[ "c#", "process" ]
26
8
32,683
2
0
2011-05-31T15:24:35.820000
2011-05-31T15:29:09.653000
6,189,878
6,206,823
Scrambling HTML / CSS issue seems unexplainable
I've recently switched over a rails app to a new server. For some reason, search results are sometimes scrambled. They look like this: But they should look like this: When I check in firebug, it seems that the wrapper div is not being parsed correctly, and so instead of a bunch of nodes wrapped in an tag, the nodes are...
I've managed to avoid the issue. If I don't wrap the whole item an tag, the problem disappears. Obviously I'd rather have the whole item be a link, but just the image is okay for now. I think another solution would be to swap the tags for tags as suggested, but this quick-fix seemed to do fine. Still seems quite bizarr...
Scrambling HTML / CSS issue seems unexplainable I've recently switched over a rails app to a new server. For some reason, search results are sometimes scrambled. They look like this: But they should look like this: When I check in firebug, it seems that the wrapper div is not being parsed correctly, and so instead of a...
TITLE: Scrambling HTML / CSS issue seems unexplainable QUESTION: I've recently switched over a rails app to a new server. For some reason, search results are sometimes scrambled. They look like this: But they should look like this: When I check in firebug, it seems that the wrapper div is not being parsed correctly, a...
[ "html", "ruby-on-rails", "css", "nginx" ]
1
0
191
1
0
2011-05-31T15:24:49.917000
2011-06-01T19:50:32.527000
6,189,890
6,189,973
ASP.Net - singleton class inside page class
I implemented a singleton class as a private class contained within my page. In the singleton, I store some data in a volatile variable. The issue is that the member variable retains its value between page executions. My assumption was that the class would be re-initialized upon first use during each page execution. Wh...
If the singleton instance is defined static it will be scoped as an application variable. The static scope is like global variable.
ASP.Net - singleton class inside page class I implemented a singleton class as a private class contained within my page. In the singleton, I store some data in a volatile variable. The issue is that the member variable retains its value between page executions. My assumption was that the class would be re-initialized u...
TITLE: ASP.Net - singleton class inside page class QUESTION: I implemented a singleton class as a private class contained within my page. In the singleton, I store some data in a volatile variable. The issue is that the member variable retains its value between page executions. My assumption was that the class would b...
[ "c#", "asp.net", "singleton" ]
0
3
350
2
0
2011-05-31T15:25:35.187000
2011-05-31T15:33:14.893000
6,189,895
6,191,797
Post an image to facebook from android, link broken because facebook is appending ?ref=nf to url
I've become very frustrated attempting to post a google chart image to the facebook me/feed. The cart image is dynamically created by a potentially very long URL. I'm able to set that URL in the "picture" key in the bundle, but if I attempt to place it in the "link" key, I get an error that it is too long. If I only pa...
Use a different url shortener service like bit.ly. I doubt Facebook is going to stop appending the referral source to links, so services and websites need to be able to properly handle querystring parameters. If anything, you could log a bug with tinyurl. Here is the bit.ly link I generated for you and it works: http:/...
Post an image to facebook from android, link broken because facebook is appending ?ref=nf to url I've become very frustrated attempting to post a google chart image to the facebook me/feed. The cart image is dynamically created by a potentially very long URL. I'm able to set that URL in the "picture" key in the bundle,...
TITLE: Post an image to facebook from android, link broken because facebook is appending ?ref=nf to url QUESTION: I've become very frustrated attempting to post a google chart image to the facebook me/feed. The cart image is dynamically created by a potentially very long URL. I'm able to set that URL in the "picture" ...
[ "android", "image", "facebook", "post", "tinyurl" ]
1
2
1,314
1
0
2011-05-31T15:25:59.947000
2011-05-31T18:22:38.027000
6,189,899
6,190,173
JQuery Validator gives always True
I have a form inside a dialog that appears after clicking in another button. After you clicked on the button the form appears where the user puts some of the values in there. Some of them are required so the have the required attribute attach to them. Am using the validator that is here http://docs.jquery.com/Plugins/V...
Looking at the documentation, it appears your input elements should have class="required" rather than required="required". That would explain why your form is always valid - the fields that are supposed to be required aren't actually marked as required. Add the required class and see if that fixes it. I couldn't see wh...
JQuery Validator gives always True I have a form inside a dialog that appears after clicking in another button. After you clicked on the button the form appears where the user puts some of the values in there. Some of them are required so the have the required attribute attach to them. Am using the validator that is he...
TITLE: JQuery Validator gives always True QUESTION: I have a form inside a dialog that appears after clicking in another button. After you clicked on the button the form appears where the user puts some of the values in there. Some of them are required so the have the required attribute attach to them. Am using the va...
[ "jquery", "jquery-validate" ]
2
6
4,205
1
0
2011-05-31T15:26:14.863000
2011-05-31T15:48:42.300000
6,189,902
6,189,911
Jquery ready function conventions
what is the difference b/w $(function(){ }); and (function ($) { //found this code in jquery uobtrusive ajax }(JQuery)); first code snippet is simply shorthand for document ready. i have no idea about second code snippet: what does it do and how does it differ from the first code snippet.
The second snippet creates an anonymous function and executes it immediately, without waiting for anything to load. It's used to create a local variable (parameter) named $ that refers to jQuery, even if someone calls jQuery.noConflict(). It also hides internal variables created in the function from the global scope.
Jquery ready function conventions what is the difference b/w $(function(){ }); and (function ($) { //found this code in jquery uobtrusive ajax }(JQuery)); first code snippet is simply shorthand for document ready. i have no idea about second code snippet: what does it do and how does it differ from the first code snip...
TITLE: Jquery ready function conventions QUESTION: what is the difference b/w $(function(){ }); and (function ($) { //found this code in jquery uobtrusive ajax }(JQuery)); first code snippet is simply shorthand for document ready. i have no idea about second code snippet: what does it do and how does it differ from t...
[ "jquery", "unobtrusive-javascript", "unobtrusive" ]
0
4
102
1
0
2011-05-31T15:26:26.420000
2011-05-31T15:27:48.857000
6,189,909
6,190,013
Where is the best place to put database ids on the client-side?
I'm serving up a page using ASP.Net. I have Add/Edit/Delete functionality of controls I've added dynamically using jQuery on a page, some of which have related records in a database. Where is the best place to put the id (primary key) for these, an attribute, data-*, jQuery.data()? Should I be concerned if the Id is vi...
Best practice is to use jQuery.data(), as this follows the HTML5 standard for such information.
Where is the best place to put database ids on the client-side? I'm serving up a page using ASP.Net. I have Add/Edit/Delete functionality of controls I've added dynamically using jQuery on a page, some of which have related records in a database. Where is the best place to put the id (primary key) for these, an attribu...
TITLE: Where is the best place to put database ids on the client-side? QUESTION: I'm serving up a page using ASP.Net. I have Add/Edit/Delete functionality of controls I've added dynamically using jQuery on a page, some of which have related records in a database. Where is the best place to put the id (primary key) for...
[ "javascript", "jquery", "html", "client-side" ]
4
1
1,436
6
0
2011-05-31T15:27:34.580000
2011-05-31T15:36:31.507000
6,189,910
6,189,938
Simplifying query across multiple columns
I have a table of classroom names that I want to compare against several known instruments. My table has a total of 11 columns but four of the columns contain the section leader instrument names(instrument1...instrument4). I want to create a SQL statement that will compare the two instruments I am looking for against t...
Given your database structure, this code is just fine. Just make sure you format it nicely and spell trombone correctly. You always have the option of adjusting your database structure, however. You could: Create a Player table, which has fields PlayerID and PlayerName. Create an Instruments table, which has fields Ins...
Simplifying query across multiple columns I have a table of classroom names that I want to compare against several known instruments. My table has a total of 11 columns but four of the columns contain the section leader instrument names(instrument1...instrument4). I want to create a SQL statement that will compare the ...
TITLE: Simplifying query across multiple columns QUESTION: I have a table of classroom names that I want to compare against several known instruments. My table has a total of 11 columns but four of the columns contain the section leader instrument names(instrument1...instrument4). I want to create a SQL statement that...
[ "sql", "select" ]
1
2
311
4
0
2011-05-31T15:27:36.297000
2011-05-31T15:30:35.050000
6,189,915
6,189,999
Android: how to repeat Android Notifications based on time
I need to implement notifications repeatedly based on android. for eg. daily at 8AM, 8PM. I have gone through the AlarmManager and Notification classes but i'm not sure about how to use/configure setRepeating() / setInexactRepeating() methods for my requirement. Can anybody suggest which is the best method to use and w...
Use setRepeating with 12 hours interval and first trigger time at 8PM/AM. long interval = 1000 * 60 * 60 * 12; //12 hours interval alarmManager.setRepeating(AlarmManager.RTC, absoluteTime, interval, intent); Where absoluteTime points eaither to 8am or to 8pm (whichever comes next).
Android: how to repeat Android Notifications based on time I need to implement notifications repeatedly based on android. for eg. daily at 8AM, 8PM. I have gone through the AlarmManager and Notification classes but i'm not sure about how to use/configure setRepeating() / setInexactRepeating() methods for my requirement...
TITLE: Android: how to repeat Android Notifications based on time QUESTION: I need to implement notifications repeatedly based on android. for eg. daily at 8AM, 8PM. I have gone through the AlarmManager and Notification classes but i'm not sure about how to use/configure setRepeating() / setInexactRepeating() methods ...
[ "android", "android-notifications" ]
0
1
914
1
0
2011-05-31T15:28:00.930000
2011-05-31T15:34:50.760000
6,189,917
6,190,225
Accessing image file contents after UIImagePicker selection
I have a UIImagePicker selection, and on the selection of an image it returns an info dictionary with the following entries: UIImagePickerControllerMediaType = "public.image" UIImagePickerControllerOriginalImage = " " UIImagePickerControllerReferenceURL = "assets-library://asset/asset.JPG?id=1000000001&ext=JPG" How can...
Can't you do this? NSData *data = [NSData dataWithContentsOfURL:[info objectForKey:UIImagePickerControllerReferenceURL]]; Alternatively UIImage *image = [info objectForKey: UIImagePickerControllerOriginalImage]; // or you can use UIImagePickerControllerEditedImage too NSData *data = UIImageJPEGRepresentation(image, 1.0...
Accessing image file contents after UIImagePicker selection I have a UIImagePicker selection, and on the selection of an image it returns an info dictionary with the following entries: UIImagePickerControllerMediaType = "public.image" UIImagePickerControllerOriginalImage = " " UIImagePickerControllerReferenceURL = "ass...
TITLE: Accessing image file contents after UIImagePicker selection QUESTION: I have a UIImagePicker selection, and on the selection of an image it returns an info dictionary with the following entries: UIImagePickerControllerMediaType = "public.image" UIImagePickerControllerOriginalImage = " " UIImagePickerControllerR...
[ "ios4", "uiimage", "ipad", "uiimagepickercontroller" ]
1
0
2,043
1
0
2011-05-31T15:28:13.613000
2011-05-31T15:52:39.603000
6,189,928
6,190,149
@ManyToOne JPA association and cascade... not sure what happens if I delete an object
I'm still not very clear about the way cascade works in deletion operations. I was wondering what happens if I have this: class myBean{ @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) public Cliente getClienteDiAppartenenza() { return clienteDiAppartenenza; } } class Cliente{ @OneToMany(cascade = Casca...
This is not a Hibernate thing, this is part of the JPA 2.0 standard. You have two aspects in your annotations, one thing is the use of orphanRemoval. You use orphanRemoval when the parent entity has control over the creation and destruction of the child entity. In UML this would be a case of composition that is a stron...
@ManyToOne JPA association and cascade... not sure what happens if I delete an object I'm still not very clear about the way cascade works in deletion operations. I was wondering what happens if I have this: class myBean{ @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) public Cliente getClienteDiApparten...
TITLE: @ManyToOne JPA association and cascade... not sure what happens if I delete an object QUESTION: I'm still not very clear about the way cascade works in deletion operations. I was wondering what happens if I have this: class myBean{ @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) public Cliente ge...
[ "java", "hibernate", "jpa", "associations" ]
8
20
30,064
2
0
2011-05-31T15:29:39.603000
2011-05-31T15:46:56.543000
6,189,934
6,195,353
SQL Server Analysis Services 2005 the instance was not found on the server
Named instance of SSAS 2005. I can ping the machine by name, IP, and FQDN. I can RDP to the machine. I've tried swapping out service accounts, and of course restarting SSAS multiple times. Using the SQL Server 2005 Surface Area configurator tool, I see that neither "local connections" nor "local and remote connections"...
I restarted the SQL Browser service and that resolved my issue.
SQL Server Analysis Services 2005 the instance was not found on the server Named instance of SSAS 2005. I can ping the machine by name, IP, and FQDN. I can RDP to the machine. I've tried swapping out service accounts, and of course restarting SSAS multiple times. Using the SQL Server 2005 Surface Area configurator tool...
TITLE: SQL Server Analysis Services 2005 the instance was not found on the server QUESTION: Named instance of SSAS 2005. I can ping the machine by name, IP, and FQDN. I can RDP to the machine. I've tried swapping out service accounts, and of course restarting SSAS multiple times. Using the SQL Server 2005 Surface Area...
[ "sql-server-2005", "ssas" ]
0
1
1,041
1
0
2011-05-31T15:30:05.233000
2011-06-01T01:32:50.093000
6,189,936
6,204,557
Is there a Sinatra style routing library/class for Objective-C?
Is there an equivalent to Sinatra's style URL routing for use with objective-C? I wish to map strings to functions with arguments to handle some internal navigation logic. I would like to have a controller manage routes like what happens in Davis.js, Express, Sinatra etc. I know TTNavigationController has this mapping,...
I have created an implementation of this on GutHub: https://github.com/rc1/RCRouter. It is not yet battle tested but a proof of concept and is very likely needs some improvements. Any help to improve it will be much appreciated. Here is the Example Usage usage: #include "RCRouter.h" -(id)init { // map routes [RCRoute...
Is there a Sinatra style routing library/class for Objective-C? Is there an equivalent to Sinatra's style URL routing for use with objective-C? I wish to map strings to functions with arguments to handle some internal navigation logic. I would like to have a controller manage routes like what happens in Davis.js, Expre...
TITLE: Is there a Sinatra style routing library/class for Objective-C? QUESTION: Is there an equivalent to Sinatra's style URL routing for use with objective-C? I wish to map strings to functions with arguments to handle some internal navigation logic. I would like to have a controller manage routes like what happens ...
[ "objective-c" ]
1
5
685
1
0
2011-05-31T15:30:20.763000
2011-06-01T16:29:24.070000
6,189,954
6,190,061
MS MVC 3 custom html helper that recieve as parameter the model?
I've written a custom html helper in MVC 3 that receive as a parameter the model my view is based on. What I'm wondering is: can a custom helper access the model without receiving it as a parameter? Is there any way to avoid calling it like this: @html.MyCustomHelper(Model)?
you can use the ViewData property of HtmlHelper to access the model helper.ViewData.Model
MS MVC 3 custom html helper that recieve as parameter the model? I've written a custom html helper in MVC 3 that receive as a parameter the model my view is based on. What I'm wondering is: can a custom helper access the model without receiving it as a parameter? Is there any way to avoid calling it like this: @html.My...
TITLE: MS MVC 3 custom html helper that recieve as parameter the model? QUESTION: I've written a custom html helper in MVC 3 that receive as a parameter the model my view is based on. What I'm wondering is: can a custom helper access the model without receiving it as a parameter? Is there any way to avoid calling it l...
[ "asp.net-mvc", "asp.net-mvc-3", "html-helper" ]
0
0
421
1
0
2011-05-31T15:31:43.363000
2011-05-31T15:39:47.773000
6,189,956
6,190,291
Easy way of finding decimal places
Is there an easy way or integrated function to find out the decimal places of a floating point number? The number is parsed from a string, so one way is to count the digits after the. sign, but that looks quite clumsy to me. Is there a possibility to get the information needed out of a float or Decimal object?
To repeat what others have said (because I had already typed it out!), I'm not even sure such a value would be meaningful in the case of a floating point number, because of the difference between the decimal and binary representation; often a number representable by a finite number of decimal digits will have only an i...
Easy way of finding decimal places Is there an easy way or integrated function to find out the decimal places of a floating point number? The number is parsed from a string, so one way is to count the digits after the. sign, but that looks quite clumsy to me. Is there a possibility to get the information needed out of ...
TITLE: Easy way of finding decimal places QUESTION: Is there an easy way or integrated function to find out the decimal places of a floating point number? The number is parsed from a string, so one way is to count the digits after the. sign, but that looks quite clumsy to me. Is there a possibility to get the informat...
[ "python", "string", "decimal" ]
99
128
144,345
16
0
2011-05-31T15:31:59.370000
2011-05-31T15:59:12.130000
6,189,958
6,195,921
No totalTime property when streaming mp3s over RTMP (Amazon CloudFront)?
I'm building a Flash mp3 player to handle streaming mp3s served by Amazon CloudFront (which uses Flash Media Server). I'm using an FLVPlayback 2.5 component to do most of the heavy lifting (I tried an all AS3 method, but any stream automatically stopped within 5 - 10 seconds of playing). When I trace out the FLVPlaybac...
After a lot more research, I found that there's no clean solution to this problem. Adobe acknowledges the problem exists, but there's no real fix. The totalTime property is read/write, so I'm just going to manually set it for each song. I should note that it may be possible to use server side Actionscript to determine ...
No totalTime property when streaming mp3s over RTMP (Amazon CloudFront)? I'm building a Flash mp3 player to handle streaming mp3s served by Amazon CloudFront (which uses Flash Media Server). I'm using an FLVPlayback 2.5 component to do most of the heavy lifting (I tried an all AS3 method, but any stream automatically s...
TITLE: No totalTime property when streaming mp3s over RTMP (Amazon CloudFront)? QUESTION: I'm building a Flash mp3 player to handle streaming mp3s served by Amazon CloudFront (which uses Flash Media Server). I'm using an FLVPlayback 2.5 component to do most of the heavy lifting (I tried an all AS3 method, but any stre...
[ "flash", "streaming", "mp3", "rtmp", "amazon-cloudfront" ]
0
0
385
1
0
2011-05-31T15:32:02.677000
2011-06-01T03:21:50.850000