Posts

Showing posts from February, 2011

how to change remove+add to move in git history -

I have a git repository which is a mix of some old SVN repo I when I mixed everything, then I just moved the files Instead of git mv was not realized, so now SVN history for most files has been lost. Is there a way to fix this? The old structure was something like this: svn1 | _apps / | _tests / | _... svn2 | _src | _libs svn3 | _src | _libs and now: root | _libs | | _svn1_name | | | _apps | | | _tests | | | _... | _addons | | | _svn2_name | | | | _src | | | | _libs | | | _svn3_name | | | | _src | | | | _libs I have tried to checkout this MV in the previous command, doing GIT MV, creating a new branch and mastering it against the ribbing but the structure is complex and the merge is a pain An easy way to do this? Generally delete one and add one when it was within the same commitment , Then GIT can quickly estimate that a nomenclature was made and rename it to git log is appropriate. However, if any file is removed and added to different commit , you will n

javascript - IE6 Strict Mode & Top:0, Bottom:0 -

I am creating an extensible window control in javascript and I want to use two boxes like this: & lt; Div id = "outer" & gt; & Lt; Div id = "inner" & gt; The content goes here ... & lt; / Div & gt; & Lt; / Div & gt; CSS for this will be as follows: #outer {status: full; Top: 20px; Left: 20px; Height: 200 pixels; Width: 200px; } #inner {Position: Absolute; Top: 0; Bottom: 0; Left: 0; Correct: 0; Limit: 10px solid red; } It is being thought that the offset height and width of the inner box will not be more than 200px, even if its limit (as shown in CSS). It works in all major browsers, but not IE6. The reason is that it does not support the idea of ​​combining top: 0, bottom: 0, left: 0 and right: to fill 0 in the original container. In quirks mode, because the box model royally gets spoiled, you can set the height and width to 100% and can be done, however, I am working in standard mode. Is there a pure CSS soluti

c# - how to write text and an image to a Response.OutputStream in ASP.NET -

I am dragging an image and using it using the following code on the web page: < Pre> bitmap image = new bitmap (350, 350); Graphics g = graphics.from image (image); // image to gauge the image using g. Save (Response.OptputStream, System.Downing.imaging.imageformat.gif); This works fine now I want to add some text to the output (javascript). However, when I do not either display text or image appears as garbage What is the proper way to do this? (* - I changed the content type and used reponse.write. Also, trying to write a byte array of text in the output stream.) You can access your Javascript and & lt; Img & gt; tag that causes another request, where you react with this image. Maybe and > request. Alternatively, this is a

slider - Isolating jQuery to only contained elements -

I'm looking for a while, and I'm new to zoom and javascript to know that I'm wrong Where am i Any help will be greatly appreciated. I have the script below, which works very well for an element, how can I modify it to work with many elements? If I have many elements on the page then the slider will scroll everything, not just the elements of a container. I know that I can technically create new variables and new class names for each method, but it is messy and I know that there must be a smart way. & lt; Script type = "text / javascript" charset = "UTF-8" & gt; Window.onload = function () {var Container = $ ('div.sliderGallery'); Var al = $ ('ul', container); Var itemwind = ul.innerWidth () - container.outerWidth (); $ ('Slider', container). Slider ({Min: 0, Max: Items Wideth, Handle: '.', 'Stop: Function (Event, UI) {ul.animate ({' left ': ui.value * -1}, 500);}, Slide: Function (Event, UI) {ul.

.net - Visual Studio 2008 XAML Designer doesn't like default name space in same assembly -

पर्यावरण विजुअल स्टूडियो 2008 एसपी 1 Visual C # WPF अनुप्रयोग प्रोजेक्ट .NET Framework 3.5 समस्या < P> आप दूसरे उपयोगकर्ता नियंत्रण या विंडो के रूप में एक ही विधानसभा में एक उपयोगकर्ता नियंत्रण है, और आप इस नए उपयोगकर्ता नियंत्रण या विंडो में इसका उपयोग कर रहे हैं। यह संकलन करता है और ठीक चलता है, हालांकि डिजाइनर काम नहीं करता है और अपवाद देता है " 'x' प्रकार का एक उदाहरण नहीं बना सका। " यह डिज़ाइनर को रेंडर करने से और डिज़ाइनर दिखाई देने के दौरान संकलन से प्रोजेक्ट को रोकता है। वर्कअराउंड जबकि इन नियंत्रणों और खिड़कियों पर डिज़ाइनर को छिपाकर कोड को संकलित करने की अनुमति देता है यह अपेक्षाकृत समाधान नहीं है क्योंकि यह मुझे इन नियंत्रणों और खिड़कियों के लिए पूरी तरह से डिजाइनर का उपयोग करने से रोकता है। कोड उदाहरण xmlns: स्थानीय = "clr-namespace: Foo.Bar.MyWpfApplication" ... & lt; ग्रिड & gt; & Lt; local: MyUserControl ग्रिड। पंक्ति = "1" x: नाम = "myControl" / & gt; & Lt; / ग्र

document - Tidying up jQuery -

I have a page that uses a lot of code, but it is becoming unbearable. I want to be able to put the related parts in separate .js files and organize it to include in a script tag on the page. I think that by using them as a jQuery plugin, then able to do this again by using $ (document). plugin_name (); on the page. Is it OK to do it or is there a better / easy way? Thanks If you import .js files, Even shenanigans of type do not have to be done in the correct order, it will work as if it were in a file $ (document) .ready (function () {}); Can use blocks without problems in any file.

Objective reasons for using Python or Ruby for a new REST Web API -

Then this thread is definitely not a thread, that is why Python is better than Ruby or Inversion. Instead, this Thread is for purposeful criticism that why you choose each other to write a separate web API that is being used by many different clients, mobile (mobile, web browser, tablet etc.). Again, do not compare Ruby to Rail vs. DJENGO. It is not a web app that depends on the high level of the frame like ROR or Dijongo I like to hear that somebody Why should you choose the option to write a resent web API, which is to start tomorrow tomorrow, completely from scratch and for reasons it can be from one another. For me, the syntax and language features are completely unnecessary, providing an abundant amount of both features and of course both can achieve the exact final goal. I think if any one flick a coin, then there is a good enough reason to use one on each other. I would love to see just that some of you web service experts who are very passionate about their work, they a

javascript - Automatically initialize rich text editor on top of all textarea's, including ones that are loaded via ajax -

मैं एक एजेक्स भारी वेब ऐप विकसित कर रहा हूं, और मुझे textarea 's class = "ui-richtext" ) के साथ स्वचालित रूप से टिनएमएमईई इनिशियलाइज़ किया जाता है। यह आसान है कि टेडटेरा के लिए सामान्य रूप से लोड किया जाता है, लेकिन एजाक्स ? मैं इन पंक्तियों के साथ कुछ सोच रहा था: (मैं jquery का उपयोग कर रहा हूं) $ ("textarea.ui-richtext")। Live ("ajaxcomplete" फ़ंक्शन () {$ (यह)। Tinymce ({...});}); दुर्भाग्य से यह काम करने के लिए नहीं लगता है किसी भी विचार? यह मेरी पहली पोस्ट है, मुझे पता है कि मुझे अधिक जानकारी जोड़ने की आवश्यकता है

bug tracking - Distributed bug tracker to go with DVC -

We have given the entire distributed item too much for version control at this point. I am not saying everything right, But, from earlier onwards, it is mostly just about issuing that which has already started. Delivered Bug Tracking , however, its initial state, IMHO is inconvenient, an issue on the road is not able to work with trackers, especially since I forget The trend is that in my last two hours what were my changes. Yes, I know, I could just keep a log on the road and update a traditional tracker as soon as I get back to the net, but still ... seeing my options open and everyone: P Currently, I only know about the other - those, and who comes along. Of these, I think the fossil is the most distant, which is not surprising, considering that the version of the equation is integrated with the control side. I have had to jump through some hop to see anything other than the SVN to my co-gods, but if the fossil is really everything, then I will not do it again. > Before

shell - killall httpd for sleep process -

This shell explains the problem after stopping the .sh file, and nothing can be done, where is my clue Kill your HTPD if there is more than 10 sleeping processes and start httpd with zero sleeping process #! / Bin / bash #this always means loop [1]; What HTTP = `ps auwxf | GRP httpd | Grep -v grep | Wc -l`; # The number of httpd processes that run # in the above line is counted and the following line states that if [$ [HTTP] -lt 10] is running, at least 10 are found; So killall-9 httpd; #included If now, then less then 10, kill them all and wait 1 second sleep; #start Apache start /etc/init.d/httpd; Fi; # Everything did, sleep for ten seconds before we sleep again 10; Done Why will you kill child procedures? If you do that you are killing all running sessions, will not it be easy to setup your webserver configuration so that it matches your needs? As Dennis has already mentioned that should look like your script: #! / Bin / Bash BINNAME = httpd # Name of the process

android - Load file from resource -

To summarize: To add a unit test to a SAX parser, I would like to load the XML from a file. Now, I have a stratigraphic string inside my Unix test class, but this is not very convenient for large XML. This is the reason why I would like to add some XML files to my project and load them in my unit test. How can I do this? This question has been tagged as "Android" and I saw that you mentioned < Code> Activity , so I think you are trying to load an XML file inside an Android application. If this is the case, keep your XML file under / assets and call: InputStream = getAssets () From there, open ("input.xml") from your activity , you can manipulate it in SAXbuilder . This will only work if you have set up your test to run the emulator (or if you are just trying to debug outside a unit test).

Need help in converting my PHP & MySQL script from mysql to mysqli? -

ZEND Controllers -- How to call an action from a different controller -

I want to display a page that has 2 forms Top page is unique to this page, but the bottom form is the first Only a separate controller can be sung from. I am using the following code to call the action of another form, but I keep this error: "Message: ID is not specified" # 0 ... / Library / Zend / Controller / Router / Rewrite.php (441): Zend_Controller_Router_Route-> Gather (array, true, true) My code: First Controller: Abc_Controller public function someAction () {$ this- & gt; _Helper-> Action stack ('other', 'xyz'); } Second Controller: xyz_Controller Public Function Other Action () {// code} Desired Results : When the phone / ABC / calls something, I want to present "some" content with the XIG / other content. I think I followed the doctor correctly () but because of the error, no help was found when I find out the code (using XDebug), xyz / other action is completed, But when ABC / Some action reaches the end, th

math - Multiplying by inverse matrices? -

If I have a matrix that is a combination of the world see launch and I increase it Due to the inverse of the launch, the world see the matrix or something else? If not, how can I remove the world? See the matrix from the world see projection matrix? Thank you for any help :) If you were in the inverse of the projection If you multiply on the right, you will see the world *. If you multiply you will find something completely different on the left, because the matrix multiplication is not short. It assumes that the projection does not have all the matrix inversion

utf 8 - Japanese text is unrecognizable in phpMyAdmin? -

I am phpMyAdmin, why can not Japanese texts be identified in tables? However, I can output Japanese text from the table and it can be displayed correctly. Any remedy? How to fix PhpMyAdmin? Most likely you have incorrectly set encoding in the table structure and phpMyAdmin What encoding is configured for the column structure in the column structure? On this topic you can help to fix it.

uitableview - Which is the best way to change the color/view of disclosure indicator accessory view in a table view cell in iOS? -

After I need to change the color of the accessory disclosureIndicatorView in a UITableViewCell . I think there are two ways to do this, but I did not understand who is the optimal accessoryView - so here's what I think I can do UITableViewCell is the property of . Then I can use the setAccessoryView: UIImageView pass view as the and as the image that I want to capture I A utility is written. The class which creates content footage (Add stuff like background color, add other content, etc.) to my cell and I add this code to the cell in UITableViewDelegate . Another option is to draw a UIImage overriding drawRect method customContentView utility class option 1 display - . I can get things done by apples, just let them see and they rest. But I think that adding a new UIView object to each line can be out to reduce heavy object allocation and frame rate in my contentView in a UIImage Compared to the object, I believe that the code is lighter than UIIma

How do I install a rails plugin from git via ssh? -

Installing a Rail Plugin using the GIT: // protocol is easy, you just Install Script / Plugin git: //server.local/my_git_repo.git How do I install a plugin from GIT repost hosted on SIS? When I type install script / plugin myuser@myserver.com: plugin.git I found " The plugin was not found " I know that this is not a git problem because the installer has not given me a signal even for my SST password. The script / plugin can not currently handle git on ssh. Instead you want to manually remove the repository from the vendor / plugins directory. $ RAILS_ROOT / vendor / plugins $ git clone ssh: //myuser@myserver.com: plugin.git plugin scripts also hidden directories Removes, .git and .git-ignored new cloned copy

Install Eclipse JDT on top of CDT -

I have Eclipse CDT installed, and I would like to install Java Development Functionality (JDT) at the top of my CDT installation. I'm goggling for an hour but I can not understand how to do it. What plugin do I need to install? All versions of Elypse have a standard basis, then depending on the version of a specific plugin, all you have to do is just go through the Help> Install new software menu, Eclipse update site (eg " Galileo - "), and under the Programming Languages ​​ section, select Eclipse Java Development Tools . If you do not see Java development tools in the list, then click the "Pre-installed" link on the install page - you already have Java Tools installed.

kill the associated buffer when close the emacs-client frame by pressing Alt+F4 -

But I am very upset that when I saw some files and lots of buffers were alive, then they stopped by pressing Alt + F4. I have to kill the buffer clearly before closing the frame. I want to know, if an epistolent is a way to behave like a light GUI editor (like vim) at this point? I think that you are asking for trouble, but you can try it: / P> (add-hook 'delete-frame-functions (lambda (frame) (let * (window (frame-selected-window frame)) (buffer (and window (window-buffer window) )) (When (and buffer (buffer-file-name buffer)) (kill-buffer buffer))))

regex - What regular expression matches this pattern: 22-NOV-09 -

I tried: / ^ ([0-3] [0- 9]) - (azza-zed) - ([0-1] [0-9]) $ / And what is not what I am doing? Thank you guys! itemprop = "text"> / ^ ([0-3] [0-9]) - ([essay] {3}) - ([0-1] [0-9]) $ / Edit: / ^ (0 [1-9] | [1-2] [0- 9] | 3 [0-1]) - ([AZ] {3}) - (0 [1-9] | 1 [0- 9]) $ / < / Html>

asp.net - Sending a Dictonary Key to JS function -

I am trying to send a diction key (which is the string) in the javascript function & Lt; TR & gt; & Lt; TD & gt; & Lt; A href = "#" onclick = "javascript: editing field (& lt;% = field.Key%>)" & gt; & Lt;% = Html.Encode (field.Value.Name)%> & Lt; / A & gt; & Lt; / TD & gt; & Lt; TR & gt; & Lt;%}% & gt; But, on the Javascript function, I get it as an object in which I have a 'femme' object. I do not get it as a string. My JS function looks like this - function EditField (field) {// blah blah} But is there a 'gatta' when sending dictary keys? You could only pass simple types like strings and integers near the JavaScript function. If you want to pass complex objects you will need to encode JSON. In your case you have not mentioned the .NET type of your dictionary key, but if this is a string then you have to put it between quotation marks and do not forget to c

browser - javascript is enabled in ALL webbrowsers by default? -

By default is not JavaScript enabled in all webbrowsers? If yes, then does this mean that Ajax / Javascript can be used in our web pages without any effect, perhaps some browsers are not able to use my website? I do not want to create a second version of the page to display non-javascript content. / P> What do you think? EDIT: It does not seem that Gmail is working with Disables. And therefore works poorly with it :) Yes, in the mainstream web browser JavaScript is by default Enabled But for users with greater safety-awareness, they are quite different from working on your site and you want it to work in other than mainstream web browsers. Do, such as access devices and search engines. Hide all your content so that it only appears with JavaScript or Flash, and you are not coming very much in Google. I do not want to display the second version of the page to display non-javascript content. That's why you make a version, as plain HTML, then add sauce.

javascript - Issue with setTimeout in ajax based polling using jquery -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मेरे कोड में मुझे ज़रूरत है एजेक्स का इस्तेमाल करते हुए प्रत्येक 5 सेकंड के बाद एक यूआरएल का चुनाव करें यूआरएल एक जेसन प्रतिक्रिया देता है नीचे वह कोड है जो मैंने $ (दस्तावेज़) के अंदर लिखा था। ऐसा करने के लिए पहले से ही। लेकिन, setTimeout () फ़ंक्शन कार्य नहीं करता है प्रतिक्रिया प्राप्त होने के तुरंत बाद startPoll () फ़ंक्शन को कहा जाता है। मैं पुनरारंभ समारोह को कॉल करने से पहले प्रतिक्रिया प्राप्त होने के बाद 5 सेकंड के लिए रोकना चाहता हूं। इसे ठीक करने का कोई भी तरीका? $ (दस्तावेज़) .ready (फ़ंक्शन () {var startPoll = function () {$ .post ('& lt; url & gt;', {}, onPollRequestComplete, 'जेसन');} var onPollRequestComplete = function (प्रतिक्रिया) {responseObject = eval (प्रतिक्रिया); यदि (responseObject.success) {// यहाँ कुछ करो} setTimeout (startPoll (), 5000); / * बाद में अगले मतदान अनुरोध करें 5 सेकंड * /} startPoll ();}); धन्यवाद यह आपकी समस्या है: सेटटाइमआउट (स्टार्टपॉल ())

python - Django: PYTHON_EGG_CACHE, access denied error -

I am deploying my own demo application on a server, and in the previous steps I am getting this error: ExtractionError at / admin / The file can not be extracted in the egg cache The following error occurred while attempting to extract the file (files) in the Python egg cache: [Erro 13] Permission denied: '/.python - The 'egg' python egg cache directory is currently set to: /.python-eggs probably in your account Do not have write access to the directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to a directory. Request method: Get Request URL: http://go-ban.org/admin/ Exception type: Extraction error exception value: The file can not be extracted in the egg cache The following error occurred while attempting to extract the file Python Undo Cache : [Errö 13] Permission denied: '/ support / thon-eggs' The Pygmy Egg Cache directory is currently set to: /.python-eggs Perhaps your account does not have permiss

ruby - QtRuby: loading HTML file into QTextEdit -

मैं कस्टम HTML- फाइल कैसे रनटाइम में QTextEdit में लोड करूँ? एक बहुत आसान तरीका है दस्तावेज़ीकरण की जांच सुनिश्चित करें, त्रुटि की स्थिति देखने के लिए और क्या न करें साथ ही, एक समय में इसे एक पंक्ति पढ़ने से एक तेज़ तरीका हो सकता है। QFile फ़ाइल (file_name); क्यूस्टस्टस्ट्रीम स्ट्रीम (और फ़ाइल); कस्ट स्ट्रिंग; जबकि (! Stream.atEnd ()) {stream & gt; & gt; स्ट्रिंग; Ui_textEdit- & gt; insertHtml (स्ट्रिंग); }

antlr : C++ target with visual studio 2008 -

Anthler site is not clear on the topic of compiling grammar for C ++, it is said that the device is C code compatible What does this mean with C ++? May 2008 be able to compile this code with VS 2008? C and C ++ compilers (both C ++ compiler can compile C code in VS 2008, this is what is That means), I do not think you will have a problem. They say: "The goal of Release 3.1 is C ++ compatible, compilation C files C ++ as C ++ class will later be provided as a separate library in 2008. . " This means that C ++ is compatible.

iphone - Using NSArray with Monotouch -

How to insert items into NSAA objects in C # (monotoch)? I did not find the appropriate method to do this? In favor of Objective-C, there is a constructor named "initWithObjects", but I did not find it on the C # side. Sorry for answering your question with pom Instead of handling NSString and NSArray with runtime, instead of c # Strongly typed arrays are highlighted in the form of C and in the API. In other words, unless you have a specific reason to mess with NSArray . But, if you have any reason, or if this is your priority, then Jason's answer is correct: NSArray someArray = NSArray.FromNSObjects (talk, one thing, two, talk three); The only thing I am adding is that if you are an objective-deity and a Monochauc are trying, if you use it: NSArray * someArray = [NSArray arrayWithObjects: obj1, obj2, obj3, nil]; Objective-C version is "zero" at the end. This is not the only requirement in Mono Touch's NSERE. You pass it only t

wpf visual studio designer won't load user controls -

is a container for the scene three user control down, and I started getting this error after application resources restructuring: Error 295 could not create an instance of 'FilterPanel' type. C: ... \ ProjectPickerWindow.xaml There is XAML to view here: & Lt; Local: StatusAndButtons DockPanel.Dock = "Down" DataContext = "{Binding}" margin = "3, 7" /> & Lt; Local: listing datacontex = "{binding}" margin = "3, 0" /> & Lt; / DockPanel & gt; The app is working fine, and I can undo the refactoring, but I do not like. Can anyone tell me how to display it in a designer? Cheers, Beryllless === ADD'L INFO @ Andrew === Great General Checklist, if not fixed yet. 1) There are no mute binding errors 2) Designer works great After filterPanel comments out! 3) no meditation behavioral behavior; All tests last 4) Yes, I have the exact Rifactor may not leave the pieces enough bread for Nakhane

process - How to save a program's progress, and resume later? -

You can learn a lot of programs, like some password cracking programs, we can stop them while running, and when we Run the program again (without entering or input the same input), they will be able to move forward from where they are left. I wonder what kind of technology are those programs using? [edit] I'm writing a program mainly based on the recursive functions. Within my knowledge, I think it is incredibly difficult to save such states in my program. Is there a technique, somehow, stack content, function calls and saves the data contained in my program, and then when it is restarted, can it stop it as if it has been stopped? These are just some concepts that were in my mind, so please forgive me if it does not understand ... This will be different for each program. For some, say, something like a cruel power password cracker will actually need to be saved for the last password tried for other apps You may need to store many data points, but in fact All this is ve

visual studio - Passing C++ structure pointer from Perl to arbitary dll function call -

I am using the Win32 :: API which calls a Pushable function exported in a DLL which is C + + Accepts composition indicator struct PluginInfo {int nStructSize; Int nType; Int nVersion; Int nIDcode; Four SJN [64]; Four Susvenders [64]; Int nCertificate; Int nMinAmiVersion; }; To create the structure we need to use the "pack" function and require to pass any argument my $ Name = "" x64; My $ seller = "" x64; My $ pluginInfo = pack ('IIIIC64C64II', 0,0,0,0,0,0, $ name, $ seller, 0,0); This structure is not well-formed. It seems that the pending argument that applies to C will interlock many of those arguments. No one, passport to call this structure form Pearl and Dell call Thanks in advance, Naga ray Z (NUL-padded string), as my $ pluginInfo = pack ('IIIIZ64Z64II', 0,0), 0,0, $ name, $ Seller, 0,0); In addition, take a look, which is part of the Win32 :: API module.

Java Serialization Comparator -

Is it possible to serial a trademark with a comparator ?? I have tested and it has been serial well without a comparator, a treemap, when you add a comparator, it throws an exception. If I declare the comparator as transient, it still does not work. It works only when I make the map of every tree transient, but in that situation the trees do not sort. All sections you want to serial are sent to them by java.io.Serializable should apply the interface. Additionally, each member variable should be serialjob in your class. In fact, your entire hierarchy should be.

Kill Running PHP Script via Process ID? -

I request a lot of requests for a number of PHP scripts by AJAX. I am currently running to ask about the implementation advice on how to kill a PHP script. (In generation). Is PHP scripts a process to run an ID when it runs and then maybe I kill that process via Shell / CMD etc? Is there any better way? What PHP is a complete process of its own, depending on how the PHP and web server Is configured. But whenever this happens, it is very difficult to catch the right PHP process to kill. If you know inside your PHP script that this is a process that requires murder, you may be able to use or find something in that user's contribution notes. I still do not understand the situation completely. Why do you need to kill them?

send variables from php to jquery? -

ive found a forum when I click on a thread, send the GAT variables to another PHP page via the URL That shows that thread. url? Threadid = 10 And Ive found a reply form below. When user submits submit submit, he will execute jquery which will call a php through AJAX. I have to pass the Threaded variable in AJAXclass php file, but I do not know how to do it. ive tried in phpfile: $ threadid = $ _GET ['threadid']; Include "Jsfile.php"; and then in jsfile: But this does not work, how can I do this? What is the right way to go here? Cookies? Jason? Please help! EDIT: BTW ... This approach is not bad JS file is capable of php code I have to include it as a php file and do not use it to link to php file To do? Slightly lost ... threaded is a request variable, So I think you have to get it from the $ _ GET array: $ Get ("static / js / ajxcale_rely.fp", {Threaded: '& lt ;? php echo $ _GET ["Threaded"]? & Gt

audio - Playback MP3 using RemoteIO and AudioUnits on iPhone... possible? -

I want to playback mp3 instead of an uncompressed file using Remoteo / AudioUnit. Using uncompressed files clearly uses too much disk space (30 MB vs 3 MB for MP3). Is this possible? If so, can you provide a slight code headstart? Thanks a million. Yes, this is possible. But it requires many audio API usage and many threads. Due to the real-time barriers to audio unit buffer callback thread, call back you must convert compressed files for PCM samples outside the audio unit. You can use the extended audio file service or AVSet reader to convert the uncompressed samples out of the audio unit callback. However, you do not need to uncompress the entire file at once. The fraction of each other is likely to have a small uncompressed buffer, as long as you keep it ahead of the audio unit callback buffer consumption rate. It can be done in a separate timer driven thread that monitors buffer consumption, and accordingly uncompresses enough audio, perhaps in a ring buffer or circu

php - The strangest thing with ob_start and headers -

ob_start and not all headers work on my webpage. I searched my whole code and I could not find anything wrong. Then I removed all my code and placed a header position at the top of the document and it still did not work, so I made a new document, copied the code from the old document and then suddenly started working it. Do you understand why this incident happens? Which editor did you use? I had to face this problem with Notepad ++ 5.x too. In my case, I changed document encoding of ASCII from UTF-8 and everything worked.

symfony1 - Symfony form validation for date fields (sfWidgetFormI18nDate) -

I am using Symphony 1.2.9, and I have a form that has two date fields: Start_date and end_date. I want to apply the following verification criteria for the 'start_date' field: i). Can not be less than today's date ii) can not exceed end_date iii). Can not be longer than 1 month For end_date, I want the following restrictions: i). Can not be longer than 3 months from today I wrote a postal verifier as follows: $ today = date ('ym -d '); // Post Validated Check Make sure that the end date & gt; Start date $ the-as-> Valid shoe- & gt; Setpoint declarator (new sfValidator and new array (sfValidatorSchemaCompare ('start_date', '<', 'end_date', array ('throw_global_error' => true), array ('invalid' = & gt; '' start date ("% Left_field%") should be before the end date ("% right_field%"); New sfValidatorSchemaCompare ('start_date', '& lt;', $

c++ - Connecting and Fetching a record form sequel server 2005 -

I have a window application in Visual C ++. I am not using MFC, in this application I am using SQL Server Connects to 2005 and receives records as a database file. Can anyone guide me how it can be done Thanks in advance. I would say, you can use some wrapper framework around the ODBC calls. I was currently working on a project where SQL Server communication was included, so I found this wrapper framework: which is an easy ODBC cover library, it is very trivial how it can be used, but I accept it I would have to patch it for a little more functionality. But otherwise it is a useful option for ODBC communication. Now, you can use the original SQL driver through ODBC. Since this is the minimal framework, if you go through the tutorials, then you will be ready to make a new application with it. Now

Static String constants VS enum in Java 5+ -

I have read that question & amp; Answer: And with a decision that the enum is a better way to implement a set of statics. Apart from this, I have read an example on the Sun Web site to add the behavior of enum (see link in the post mentioned earlier). Therefore, there is no problem adding string key with string key to keep a group of string values. The problem here is that we need to add ".nameOfProperty" so that the string value So in code everywhere we need to address not only its name (EnumName.MY_CONSTANT) with constant value, but in this way (Enum.MY_CONSTANT.propertyName). Am I okay here? What did you think about it? Yes, naming can take a while, but no one can imagine as much ... Because the anonymous squares already give some context ( "what is the set of constants related?" ), Example name is usually less That constant name (strong typing has already been discriminated against by similar names in other names). In addition, you

visual studio 2008 - starting 64 Bit Windows Application Development -

Using Microsoft Visual Studio 2008, you want to start writing 64-bit scientific computing applications for Windows (Signal Processing). What should I do? As far as a development platform is concerned, then what is ready? How will it differ from 32bit development? Is there a porting problem for 32bit versions that I already have (okay - can it be quick to ask if even before I start the compilation)? As you have guessed, I see general instructions all indicators will be appreciated! :) When Visual Studio 2008 is installed, Note to keep that box running, which installs 64 bit compiler and device, because it is not by default . Then you can refer to these articles for a guide on 32 to 64 bit migration:

mysql - How to pull grandchildren from database -

I want to draw menu items from MySQL. Main ID = 1, Parent = 0- Us ID = 2, Parent = 1 - Music ID = 3, Parented = 1 - Rock ID = 8, Parented = 3 - Classic ID = 9, Parented = 3 -Car ID = 4, Parented = 1 - Toyota ID = 5, Parented = 4, - Ford ID = 6, Parented = 4, --Haida ID = 7, Parented = 4 Other Menu ID = 10, parent = 0 - othermind id = 11, parent = 10 --submenu id = 12, parent = 11 etc. I can extract data from id = 1 to 4 and display "... where parent = 1" etc. Although it only pulls the top level But I also want to remove all the data including the submenu for each menu (main menu). Can someone tell me how to write a query Need to implement Recursio To retrieve all the children again and again, you will have to change your database architecture layer implementation on your own, but the concept is the same. Memcache solution function generator ($ parent = 0, & amp; $ tree) {$ sql = sprintf ('Select from Parents =% d ', $ parent with excursion)

asp.net - Bind a multi-dimensional ArrayList to a Gridview -

I have a datagroup with a checkbox to provide a seat to provide seats, but in the button click event, if the check If the box is clicked, then I'm adding line contents to an Arrayist, then adding ArrayList to a session before redirecting to the confirmation page: Secure Zero Reserve_Click (Object Sender, EventArgs e) {{ArrayList SeatAutria = New ArrayLi St (); {Grid Seat ID = (Gide) Gridview for (Int i = 0; I & lt; GridView1.Rows.Count; i ++) 1. Data [I] [0]; Check box cbReserve = (checkbox) GridView1. Traverse [i] .FindControl ("cbReserve"); Label lblSection = (label) GridView1.Rows [i] .FindControl ("lblSection"); Label lblRow = (label) GridView1.Rows [i] .FindControl ("lblRow"); Labeled lblPrice = (label) GridView1.Rows [i] .FindControl ("lblPrice"); If (cbReserve.Checked) {string tempRowInfo = lblSection.Text + "|" + LblRow.Text + "|" + LblPrice.Text; SeatingArreaList.Add (tempRowInfo); }} // Seats selected

sql server - Documentation Template for SSAS Cube -

I need a template to document an SSAS cube. Cube info A source of data A key facts table Five direct dimensions Two many-to-many dimensions 48 divisions, 48 ​​aggregation Can someone design a template for SSAS cubes? document again; I have been bookmarked for a while , although I did not try it myself If you use it, make a comment. Also filter by and "Docs".

objective c - Displaying percentage using NSString -

How do we display percentage characters in objective-c? I am using this: [NSString localizedStringWithFormat: @ "% .2f%", percentq]] but For some reason, this% does not recognize. I thought I could survive using this ... but I was very wrong. A similar question was tagged C asked today:. The answer here is the same ... use a double %%.

plot - Why does a circle plotted in MATLAB appear as an ellipse? -

I am surprised at MATLAB how I plot a circle and will show it as an oval rather than by default . I think this axis has something to do with the local coordinator system. You can use the command here is an example to keep the data letters uniform on each axis : theta = linseed (0, 2 * pi, 100); Subplot (121); Show the default plot plot (cos (direct), sin (theta)); Title ('default axis settings'); Subplot (122); Show a conspiracy with conspiracy of% equal data units (cos (direct), sin (theta)); Title ('consolidated tick spacing'); Axis is equal to;

c# - Can you add security to an entity Property with RIA Services? -

RIA services allow you to add properties such as a domain service method: RequiresRole ("Admin"). It will automatically check whether the user who calls the method has the right protection to do this. I want to do something similar for the property on an entity. For example, in the role "manager" only users are allowed to change the "rate" property, but any user can change the "comments" property. Is this possible? A better way of supporting security for properties is by overriding the DomainService.Query method, Make more blogs about how you will avoid loading excessive data.

iphone - Does Apple Reject applications that use a lot of bandwidth? -

I've heard reports that Apple will reject applications that use excessive bandwidth, the number I've heard , It is the maximum use of 1MB / minute> bandwidth, although I have seen this number on different boards, I can not clearly get any explanation about this from Apple's guidelines. I am looking to stream a video for a video and I want to know what the maximum encoding rate of the video should be. Does anyone know what is the correct number? Is this a document somewhere? There is no published limit, I believe Apple has to make some space for itself Behind yourself, decisions about personal apps Keep in mind that you will need to use bandwidth in any way on the cell, because slowing the edge is no limit on WiFi.

Managing different windows in Apple's Interface Builder -

I am working on the interface builder. I do not like the fact that I have to manage many windows, for example if If I open two xib files then my window can have six different windows easily. One problem is bringing these windows together to create a sensible arrangement. Another problem is that the interface builder does not remember this system if I open it again is a sub-in-one view in the interface builder? How do you deal with that? Interface Builder does not help with window management very best way I found it to deal with Use spaces and open each IB document in its own place. It helps to manage at least the disorder.

class - How do I create my own Classes/Objects in Flex? -

When I try to do this in AD Cdata block, it tells me that class can not be declared in class (MX: application itself). Makes sense. But how else can I? You create a new file with a .as extension, and enter the definition of your class in it.

c++ - Should "delete this" be called from within a member method? -

I was just reading it and would like people's advice: question: what it Should be removed; Can the member be called from within the law? Usually this is a bad idea, but it is sometimes useful. It is completely safe until you use any member variables after deletion, and as long as the client calls this method, it can remove the object. > When this is useful, then there is a good example of if your class counts the reference: zero referee () {m_References ++; } Zero Deref () {m_References--; If (m_References == 0) {delete it; }}

sql server - Why is a trailing SET inconsistently throwing an error in SQL? -

I'm seeing one of our web applications, and it was calling a stored procedure that was updated Was responsible for a record in the database. There is no problem for the week in this stored procedure, and one day he started throwing errors, while debugging found us to be within the stored procedure. It was originally a statement like this get started / do stuff set end then SET Never set anything up for some reasons it runs perfectly on our servers and until today, the client was running fine on the server until it decided to start the complaint. (Incorrect syntax error) Is there any type of SQL server setting that can cause a sudden change in behavior? Explanation - SET has always been in the process and running a SET by yourself, or the only statement in a stored procedure As it really works for me, this problem is, it should not work not so there is anything that is due to its working, when it should be unsuccessful? A SET as usually fails to co

teamwork - Teamworking in software development etiquette -

I use a lot of coding (when lucky enough to assign something ...) are usually personal projects As I run source control only locally, what are the best practices for working with source control and generally working in software development team? Etiquette, best practices, what not to do etc. Always store your source control trunk in the compilation state - this means that you will never have to compile errors Should not be checked in code with What I usually do is write a script that is capable of running a test, and only checks it after running it. This script is clean compile and then runs all the unit tests / system tests and verifies the correctness, there is also a regression test, which remains in this way to show everything working in the beginning. In addition, as often as possible check-ins, you can rollback in almost every possible situation. In addition, for the same reason, write informative comments while checking.

.net - How can I do an atomic write/append in C#, or how do I get files opened with the FILE_APPEND_DATA flag? -

With O_APPEND, the Open () operating system writes OS mostly under Unix and Pozix according to the operating system calling it, which writes I write nuclear and write operations. With this behavior, when you type for local file system, you know that it attaches to the end of the file. The Windows operating system FILE_APPEND_DATA for Win32 CreateFile () system calls in the appropriate parameters. Reference: http://www.google.com/search?q=msdn+createfile or: http://msdn.microsoft.com/en- Us / library / aa363858 (VS.85) .aspx http://www.google.com/search?q=msdn+IoCreateFileSpecifyDeviceObjectHint Or: http: // www. Google.com/search?q=msdn+IoCreateFileSpecifyDeviceObjectHint My problem is, I can not determine how to get this behavior under C # by using Net Framework libraries Is there no way to do this behavior using Net Framework? I do not believe in using FileMode Append gives such behavior in such a way. Use an overload filestream constructor: New filestream (file

message - reading error dialog in java -

I need to read some error messages in Java, I have tried to get it in getrerorstream and then read, but I Exceptions found. I have added a link to the picture of the error message that I want to read TNX TrueCrypt is not your Java program, and Java is not a properly functional way to access the message of any other program near Java. getErrorStream () will work if TrueCrypt has a text output for its standard error, but since the user has a dialog to show it to the user There is no reason to do this. It is possible that TrueCrypt is a non- and you Runtime.getRuntime (). Exec can hold using "(TrueCrypt.exe") , as a result the process is waiting to finish (using Process.waitFor ()) ) and then Check out the status of the exit that you will find there. However, you still need some (or something) to kill the OK button.

regex - Grep regular expression for 4 digits among character string of variable length -

I need some methods to find words and any combination of digits but exactly 4 marks only , and at least one character Example: a1a1a1a1 // match 1234 // no match (no letter) a1a1a1a1a1 // no match AB2b2 / no match CD12 / match Match 9999 / Match 1 AB 26A 9 // Match 1B1C1 // // Match Match 12345 / No Match 24 / No Match A2B2C2D2 / Match AB11CD22D3D3 / [ itemprop = "text"> To match a digit in GP [0-9] ] You can use. To match any number, you can use [^ 0- 9] because it can not be any number, or any character, so you add "*" (any number preceding it). So what do you want logically (nothing a digit or nothing) * (no single digit) (nothing a digit or nothing) *. ... Unless you have 4 "no single digits" group i.e. i.e. [^ 0- 9] * [0-9] ... I am meeting with long patterns, especially with the long string of special characters, it is best to raise slowly, you are sure you understand what is going on. For example, # This will expose you

c# - Change color of dates on monthCalendar -

How do I change the date color on the calendar of months? I have a datagrid view with a column for dates, how do I take those dates, input them into calendar of my month, and change the color of the dates in the column? If you can participate with bolding dates, then only use AddAnnuallyBoldedDate and then Call UpdateBoldedDates. Update: .

office interop - How to speed up generation of Word files from C#? -

I am working on an application that generates a large amount of word output. At present, we are using Word Interop services to produce documents, but it is quite slow, especially in older versions (pre-2007), we want to speed up generation. I have not done so many profiles yet, but I have full faith that the problem is that we are making lots of com calls. I hope the setting will subscribe to slow-motion calls compared to others, but my stomach tells me that this is probably the question of com overhead (or word interop overhead), and not just a few slow calls. > Apart from this, HTML can generate output, and this process (A) is very fast, and (b) uses a different sub-category as well as very codepath for a piece of HTML-specific functionality So I'm pretty sure our algorithm is not fundamentally slow. So ... I'm looking for suggestions for alternate ways to speed up generation of Word files. We can not just convert the generated HTML files into .doc, and we can n

python - Working with bit streams -

I have base 64 encoded bit stream, I want to work with it. After decoding it, I get a byte object (pie 3k bitd) with base64.b64decode , which has a decode code. The problem is now, that I want to work on that byte, objects with bit-wise operation, such as transfer, bit wise and etc., but this is not possible because it is a byte sequence. / P> Is there a way to binary action on that decode code? Try to use list (biotech) example. & gt; & Gt; & Gt; Bstring = b "Hello World" & gt; & Gt; & Gt; List (bostring) [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100] & gt; & Gt; & Gt; If you want a huge bitfile instead of all those octets & gt; & Gt; & Gt; Less than Funktal import & gt; & Gt; & Gt; Less (Lambda X, Y: (x & lt; & lt; 8) + y, list (b "Hello world") 87521618088882533792115812 & gt; & Gt; & Gt; Bin (_) '0b100100001100101011011000110110001101111001000

android - How can I switch the activity of the content of a tab in Tabhost -

मैंने एक TabHost बनाया है और 1 टैब में, मैंने < Code> mTabHost.addTab (mTabHost.newTabSpec ("tab1") .setIndicator (getString (R.string.dialerIconLabel), getResources ()। GetDrawable (R.drawable.ic_tab_dialer)) .setContent (आशय)); P> आप आसानी से बदल नहीं सकते हैं कि देखें टैब की सामग्री है हालांकि, उस दृश्य में केवल एक दृश्यमान बच्चे के साथ ViewFlipper , या फ़्रेमलेआउट हो सकता है, जो आपको समान दृश्य प्रभाव दे सकता है।

algorithm - How can I sort a Perl list in an arbitrary order? -

I have a list of wires, whose value comes from a fixed set. I need to sort this list arbitrarily. The order of the set is specified by a list of all the possible strings, which is sorted into an array. Here's an example: my @all_possible_strings_in_order = ('name', 'road', 'city', 'state', 'postcode'); My @list_that_needs_to_be_sorted = ('city', 'state', 'name'); I am working in Perl. I understand my best condition that is automatically creating a hash that connects the stars with sequence numbers, and then the sequential numbers Sorts according to context. There are approximately 300 possible strings in the set. Specific lists will have 30 strings that need to be sorted. It is not being called in a tight loop, but it can not be slowed too. Due to the structure of the program, the gradual hash can not be created automatically before time. I'm open to suggestions for doing this in a better way. Tha

c# - How to load a specific patch/rectangle from an image? -

We have an application that shows large image files (satellite imagery) from local network resources. To speed up image rendering, we split the image into smaller patch (like 6x6 cm) and app tiles them properly. But each time the satellite image is being updated, the split pre-process should be done, which is a time consuming task. I wonder how can we load patches from the original file? PS1: I know, but we need an open source solution. PS2: App N.T.T. C # in EDIT 1: The format is not a point for us, but currently it can be considered to replace the JPG format, but the BMP format is not acceptable in large quantities is. "post-text" itemprop = "text"> I mention a beautiful effort to answer your question, but my browser has eaten it ...: (< / P> Actually what I tried to say was: 1.- Since JPEG (and most compression format) uses a secuitive compression, you can always use all those bits You need to decode which you need. 2.- Solutions that

objective c - crop image from certain portion of screen in iphone programmatically -

एनएसएयूटीओरियसपूल * पूल = [[एनएसएयूटीओरियसपुल आलोक] इनट]; CGSize contextSize = CGSizeMake (320,400); UIGraphicsBeginImageContext (self.view.bounds.size); UIGraphicsBeginImageContext (contextSize); [Self.view.layer renderIncontext: UIGraphicsGetCurrentContext ()]; UIImage * savedImg = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); [स्व सेटस्वेइज़ेज़: बचाइएग]; मुख्य स्क्रीन से छवि के कुछ भाग को extarct करने के लिए। UIGraphicsBeginImageContext में मैं केवल आकार का उपयोग कर सकते हैं, CGRect या छवि निकालने के लिए किसी अन्य तरीके का उपयोग करने के लिए कोई रास्ता नहीं है स्क्रीन के एक विशेष भाग से (एक्स, वाई, 320, 400) कुछ इस तरह से आशा यह मदद करता है: // नया चित्र प्रसंग बनाएं (रेटिना सुरक्षित) यूआईजीआरएफ़फ़्रेंसजर्मइज़ेज़ेन्टेन्टेकविथ विकल्प (आकार, नहीं, 0.0); // छवि के लिए रीसेट बनाएं सीजीआरसीआरसीटीआरसीटी = सीजीआरएक्टेक (एक्स, वाई, आकार। वाइड, आकार। हाइट); // छवि को रीक्ट में डालें [मौजूदा इमेज ड्राइनक्ट: रीक्ट]; // छवि को सहेजना, छवि संदर्भ

bash - How to get $this->translate('Content') => Content in a Textfile -

I am having a shell script which scans all my subdirectories for a direcotry and .php and .phtml files. Within these files, I am looking for the $ -> translation (') statement (also $ -> view-> translation (' ')) and I want to save the content of these statements in a text file. The problem is, there are many different types of this statement: $ this-> translation ('single quotes') // I want: single quotes $ the-> Translate ("double quote") // I want: double quote translate $-> (single quote with place '% 1 $ s placeholders , $ Xy) // I want: Single quote with% 1 $ s placeholder $ the-> translation ("double quote with% 1 \ $ s", $ xy) // I want : Excerpt with Dobule% 1 $ s $ the-> view-> translation (with 'View') // I want A: Translate $ (with "View 2") // I need: with View 2 $ the-> Translate with the view $ li (Single Quotes with "Couple") // I want: Single quot

Django: filtering models on the difference of Counts of related models -

I've got a bunch of order objects, each one or more orderreaves are associated with objects (as their reverse relation Appearance order.order_oroz.all ()) with parent order. Each order has a collection_states attribute, which can be 'collected', 'recalls' or a bunch of other special values. Each order has a status attribute, one of the valid values ​​for 'processing'. I'm on the loss in trying to create an order query set which lists the following objects Criteria: The status of the order is 'processing', its archive_stateus = 'calculation' calculated * < / Code> Orders are less than the total number of their orders To keep it explicit: Order with two rows, both 'unlocked': included in the QS- order With three rows, one 'collected', two 'Ricolte' 'Include: QS order with two lines, both "collect": QS not included! (You can replace 'unselected' with any other value whic

jquery - iframe based IE6 javascript memory leak? -

I'm loading the material using an iframe through a menu with jquery that iframe's 'src' Updating the attribute then load it into the desired page. Each page has its own javascript and contains heavy content. The code is as follows: - $ (document) .ready (function () {loadPage ('Main.php');}); Function load page (url) {$ ('# applicationFrame'). Attr ('src', url); } And iframe on the index page looks like: - (Side note: making me realize that even iframe non-standard features, but which one is an internal intranet applications that were running in a Microsoft HTA Anything they mean are: Anyway, the menu items are just calling Javascript: loadPage ('whatever.php') is necessary to load into whatever content. The problem are leaking frames memory On each subsequent page of the menu is facing the I 'm until full app reports following SIEve can not slow down a crawl The leak column is increasing with every click (21

.net- framework and .net general -

क्या है नेट? ढांचा और सीएलआर .NET माइक्रोसॉफ्ट के कई नये प्रौद्योगिकियों के लिए मार्केटिंग का नाम है क्योंकि यह इतनी व्यापक संग्रह है, यह वास्तव में परिभाषित करना कठिन है कि यह है । CLR एक आम भाषा रनटाइम है, जो एक बाइटकोड भाषा और इंटरऑपरेबिलिटी नियम है जो इसे आसान बनाता है भाषाओं को बनाने के लिए एक-दूसरे के साथ अच्छी बातचीत करें उदाहरण के लिए, .NET बनाने से पहले Visual Basic कॉल C फ़ंक्शन अजीब और त्रुटि प्रवण था। .NET में, विजुअल बेसिक सी # बिना कॉल कर सकते हैं।

php - How to profile SQL queries in MVC framework? -

I am working on my own php MVC framework. I just wanted to get my thoughts about all the profiles running on my profiles, I had other profiling material but I do not know how to profile SQL queries, also to see if They change profiles. Thanks It depends on how much information you really want , But to generate some generic for you, I will consider some of this (this class to which you are using to interact with the database): & lt ;? Php // Your Database Access Class Class DB {// Profiling Data Private $ sqlDataProfile = array (); Function query ($ sql) {$ starttime = time (); // Get the time before the query // query and start here profiles here whatnot //: $ this-> AddSqlProfile ($ sql, $ starttime); } // Get the total number of queries to calculate the getNumberOfQueries () (return calculation ($ this-> sqlDataProfile);} Personal function addSqlProfile ($ sql, $ starttime) {// Temporary Array $ tempArr = Create array ('Sql' = & gt; $ sql, 'tim

build - Grails and Local Maven Dependencies -

I'm developing a small web frontend in Grails, it's basically a "ultra light-weight" client app that Async is connected through JMS. I have two dependencies in the project which I would like to draw from a Mewen repository. They are activemq and acme-adapter-api , in-house dependencies are not available in the remote repository. To reach my dependence, I am setting up my BuildConfig.groovy ( Grails 1.2M4 ) file like this: repository {grailsPlugins () grailsHome () mavenCentral () mavenRepo ('D: / maven-repo')} dependency {compile 'org.apache.activemq: Apache-Activate: 4.1.1' Compile ' Com.acme: Acme-adapter-api: 1.3-SNAPSHOT '} When I run grails dependency-report , then I will call this code as Acme-adapter-api , for example: com.acme 108 kB (0kB downloaded, 108 KB in cash) acme-adapter-api When I see grails compile I try not to be so fortunate, because I complain that it is unable to resolve sections from the com