Posts

unable to read a file in c language. it creates a new file instead of reading it -

I have created a file in the directory and want to read it. I am using the following code to open and read a file in C-language but instead of reading the old file, I create a new file. int main () {FILE * file; File = FOPAN ("file", "R +"); // file reading fclose code (file); Return (0); 'r +' mode to open Are using the file. This creates a new file if the directory does not already exist. See the following code for your help. int main () {FILE * file; File = FOPAN ("file", "r"); If (file! == NULL) // read the second file and printf ("Error reading file"); Fclose (file); Return (0); } Also check the file name that you are using in the phpon () function. This case is sensitive and also checks the extension of that file; .txt or .data or what ever eg .; file = fopen ("file.txt", "r");

php - .htaccess RewriteCond %{REQUEST_FILENAME} !-d not working -

.htaccess कोड है, RewriteEngine पर RewriteBase / RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule ^ पी / ([एक-zA-Z0-9 -_]) /? $ redirect.php? url = $ 1 [एनसी, एल] # RewriteRule ^ [A-Za-z0-9 -_] + / ([A-Za-z0- 9 -_] +) /? $ Product.php? Seo_id = $ 1 [एनसी, एल] # रेवरइट नियम ^ ([ए -Za-z0-9 -_] +) /? $ Catalog.php? Seo_id = $ 1 [एनसी, एल] # मैं http: / /example.com/directory/ जो पहले से ही सर्वर में मौजूद है लेकिन मैं इसे एक्सेस नहीं कर सकता। कोई भी त्रुटि उत्पन्न नहीं हुई है, लेकिन अगर पहले से मौजूद निर्देशिका के लिए कोई अनुरोध है, तो RewriteCond% {REQUEST_FILENAME}! -d के बाद नियम लागू नहीं किया जाना चाहिए। लेकिन इस में मामले में से 3 नियमों में से एक आवेदन कर रहे हैं। पुनर्लेखन% {REQUEST_FILENAME}! -d काम नहीं कर रहा है। रीवाइटटॉन्ड केवल अगले रीराइटरेबल पर लागू होता है, न कि उन सभी के लिए फिर आपको उन्हें इस प्रकार डुप्लिकेट करना चाहिए: पुनर्लेखन कन्वर्ट% {REQUEST_FILENAME}! -f पुनर्लेखन कन्वर्ट% {REQUEST_FILENAME}! -डी री...

ios - Launch app on specific view controller using iOS8 actionable notifications -

I have a functional information setup on my app with the YES button. Is it possible when the notification is triggered? And to move you to an application on a specific view controller, click on the button, not the initial view. Yes you use this new method of iOS8 using the handleActionWithIdentifier You can. Whenever you press the action button, this delegate will call. Representative for local notifications : Local notification when your app is activated by the user - ( Zero) Application: (UIApplication *) Application Handle ActionWidth Identifier: Local Notification (NSString *) Identifier: (UILocalNotification *) Notification Complete Handler: (Zero (^) ()) Full Handler Representative for Remote Notification : When your app provides remote notices by the user Application: (UIApplication *) Application Handle ActionWidth Identifier: (NSString *) for identifier. Remote notification: (NSDictionary *) userInfo completionHandler: (Zero (^) ()) Finishing Handler ...

python - Confused about variable scope using matplotlib -- axis object -

I do not know why the following code works: If I comment on ax assignments in main, then to do this work How does the ax get in the purview of the ceremony? This version of Python is 2.7.2. After a little more research, I have found that all variables are seen in the main block defined function in this same code module. I did not know that the dragon worked like this! Each variable in the Main block is visible to all functions in the same source file. It does not kill me desirable! How it works is that I think this exception has been made for the Main code block, but I will not be guessed. ): Ax.plot ([1], [ 2]) # How is this ever defined? Return if (__name__ == "__main__"): fig = plt.figure () plt.clf () ax = plt.subplot (111, polar = true) # If I comment it out, then the ax function defined the error Call plt.hold (true) f () "This is the form of me It's desirable to do that! It seems to be about which work. " You should avoid ha...

javascript - Unicode Character 'BULLET' in Titanium App -

I have a problem with the bullet character developed with titanium in my Android app. I have part of the code: getFormattedPizza (function) {var text = win.crust + 'With pizza: \ n'; If (win.toppings.length == 0) {text + = '& amp; Bulls; Plain (cheese pizza) \ n '; } Else {for (var i = 0; i & lt; win.toppings.length; i ++) {text + = '& amp; Bulls; '+ Win.toppings [i] +' \ n '; }} Return Text; } And in my app, I get the string & bull; Plain (cheese pizza) , not a noodle list. In this way can I show a dots list? & amp; U2022 '+' Plain (cheese pizza) instead of bullock , \ u2022 is unicode for bullets. Sample code: var lbl = Ti.UI.createLabel ({text: '\ u2022' + 'hello'}); Win.add (LbL); For more Unicode, you can see it or refer to it. Hope this will help you. :)

windows - Scheduled Powershell Task, stuck Running -

Image
I have problems while running PowerShell script in the scheduled task. I get stuck in running it, even if transcript has the last line "don ! " And it looks like I want to do this. What am I missing? It looks fine when running from run in Windows: powershell -file "D: \ _ temp \ copy_bat \ copy_one_reprint_folder.ps1" The Task Scheduler has a set: Run with full privileges Whether we log any user or not action, program Start powershell.exe -file "D: \ _ temp \ copy_bat \ copy_one_reprint_folder.ps1" If necessary please see the code below. # $ PowerShell Reprint Copy first folder, Last Modified Function Timestamp {$ ts ​​= Get-date-return of format $ ts} $ from directory = "D: \ _ temp \ copy_bat" $ ToDirectory = "D: \ _ temp \ in_dummy" $ extractGUIDdir = "" $ docTypeDir = "# # logging ######### Error operation_princess =" quiet content "stop-transcript | out- null $ ErrorActionPr...

php - Test multiple urls (files) with codeception and log separete results -

मैं कोडेपीशन का उपयोग कर होमवर्क असाइनमेन्ट के लिए एक छोटा परीक्षण सूट बनाने का प्रयास कर रहा हूं। मेरा विचार है कि एकाधिक यूजल के लिए एक एकल सीस्ट टेस्ट परिदृश्य को लागू करना और अलग-अलग परिणाम प्राप्त करना है, जिसे मैं कुछ पहचान के द्वारा लॉग कर सकता हूं (उदाहरण के लिए फ़ाइल का नाम)। दो मुख्य चीजें हैं जो मैं कर सकता हूं अलग-अलग यूआरएल के साथ एक ही परीक्षा को कैसे चलाया जाता है और हर टेस्ट के लिए लॉग इन असफल दावों / उत्तीर्ण दावे कैसे करें? हर दावे की जांच कैसे करें, भले ही उनमें से कुछ विफल हैं? पहले से धन्यवाद! पहला भाग: मुझे लगता है कि आप सेलेनियम के साथ कोडेशन का उपयोग कर रहे हैं। आप इसे स्वीकृति.suite.yml में कॉन्फ़िगर कर सकते हैं: class_name: स्वीकार्यताईस्टर मॉड्यूल: सक्षम किया गया: - वेबड्राइवर - स्वीकाटनहालर कॉन्फ़िग: वेबड्राइवर: यूआरएल: 'http://localhost.dev:8000/' ब्राउज़र: 'फ़ायरफ़ॉक्स' env: url1: मॉड्यूल: Config: WebDriver: url: 'http://url-1.dev/' ब्राउज़र: 'क्रोम' url2: मॉड्यूल: config: WebDriver: url: 'h...