Posts

Showing posts from January, 2012

Segmentation fault (core dumped) error C linux sockets -

Please send me the program through sockets, but this error shows the segmentation fault when I run it The server uses the thread to implement multiple clients. Thanks! This is my final project! This is the server code: # include & lt; Stdio.h & gt; #to & lt include, string.h & gt; #to & lt include, stdlib.h & gt; Sys / socket.h & gt; #includes & lt; # Include & lt; ARPA / inet.h & gt; # Include & lt; Unistd.h & gt; #to & lt include, pthread.h & gt; Static const int BUFFER_SIZE = 1024; // Producer Halo Zero * Connection_Handler (Zero *); Int main (int argc, char * argv []) {int socket_desc, client_sock, c, * new_sock; Struct sockaddr_in server, client; // craker socket socket_desc = socket (AF_INET, SOCK_STREAM, 0); If (socket_desc == -1) // Error al-sial EL socket {printf ("Error Alla CREAR EL Socket"); } ("Socket creeda"); // Socket CREDA // Walos Dell Socket Server. Sin_family = AF_INET; // Socket IP

java - Index out of bounds error -

I'm having trouble with my code. I can tell why I'm getting an index due to the error, this code Estimating 2 byte arrays to combine into one. "According to the list [status] = bytead [t]"; But I do not know what is wrong. These arrays are started at 200 byte size. scanner input = new scanner (System.in); System.out.println ("Enter a web address"); String net = input.nextLine (); String net [] = net. Split ("\\."); Byte [] Length = New Byte [200]; Byte [] bytead = new byte [200]; Int bytelength = byteAdd.length * 2; Byte [] list = new byte [200]; For (int i = 0; i & lt; nets.length; i ++) {length [i] = (byte) (double) (net [i]. Length ()); Println (length [i]); } (Int i = 0; i & lt; nets.length; i ++) {byteAdd = net [i] .getBytes (); } Int position = 0, max = 0; For (int i = 0; i & lt; bytelength; i ++) {list [position] = length [i]; Status ++; For (int t = 0; t Is this stacktrace? " main "java.lang Exception in th

c++ - Finding Origin of Symbol Dependency -

I am working on a large project that has a ton of external dependency for a while I'm working on debug build. Now, when I try and release (after a long time), I get an error saying that a specific symbol is not found. Specifically in my case, the linker gives me an error saying the start_thread_noexcept not symbol. This symbol is expected to be found in the yarn-thread, but when I check the version of the Boost thread using the nm -G -D-demangle , I think that in fact This symbol is not found (I got the name of the start_thread name). Obviously, nocecext symbol can be found in more recent versions of the library. My question though, is more common. What I want to do now is to find out the basics of the need for this symbol. I am guessing that there should be some new function call which I am doing which in turn invites the start_thread_noexcept function. Obviously, when compiling my code, a .o file should be generated, so that I can see this requirement below. Either

asp.net - Could not load file or assembly 'Oracle.DataAccess' Issue -

When I run an application in asp.net, it displays some error as below ... what can I do ? Can you solve this issue? The file or the assembly can not be loaded as 'Oracle.DataX' or one of its dependencies. The manifest definition of the assembled assembly does not match the assembly reference. (Exception from HRESULT: 0x80131040). Oracle version 2.112.2.0 All you need is the web. The assembly file needs to redirect the assembly to an existing one: & lt; Runtime & gt; & Lt; Assembly binding xmlns = "karash: schema-microsoft-com: asm.v1" & gt; & Lt; dependentAssembly & gt; & Lt; Assembly name = "Oracle.DataAccess" publicKeyToken = "89B483F429C47342" culture = "neutral" /> & Lt; Compulsive redirects older version = "9.2.0.700" new warsen = "4.112.3.0" /> & Lt; / dependentAssembly & gt; & Lt; / assemblyBinding & gt; & Lt; / Order & gt;

java - Eclipse content assist for Gradle dependencies -

I am using Grails Tool Suite (Eclipse) and for the Grails project I can not understand a good way to get an eclipse. Helps work for content libraries (Google Guva), which is dependent on Gradle, I can download libraries After the construction can be added in the path, but I hope there is something better so that I do not have to make jars. Have you tried to use to create the right class entry entries? Apply the plugin: Apply the plugin: 'eclipse' Accept gradle in your build file and refresh the project < / html>

haskell - how to parse yahoo csv with parsec -

सरणी में पार्स कैसे करें जैसे कि खुली [i], उच्च [i], कम [i], बंद [i] testhaskell.hs: 22: 5: `IO 'के साथ प्रकार' [] 'से मिलान नहीं किया जा सकता है अपेक्षित प्रकार: IO a0 वास्तविक प्रकार: [a0] कॉल की वापसी प्रकार में 'मानचित्र' में एक 'डू' ब्लॉक के एक एसटीएमटी में: नक्शा (\ line - & gt; वाक्य रेखा) allLines अभिव्यक्ति में: करना {हैंडल & lt; - openFile "सी: \\ उपयोगकर्ता \\ ivan \\ Downloads \\ 0388 .HK.csv "रीडमोडा; सामग्री & lt; - hGetContents हैंडल; AllLines = पंक्तियाँ सामग्री दें; मानचित्र (\ line - & gt; वाक्य रेखा) allLines; ....} testhaskell.hs: 22: 19: अपेक्षित प्रकार 'स्ट्रिंग - & gt; A0 'वास्तविक प्रकार' के साथ। पाठ। पैरासेक। प्रिम पर्ससीटी स्ट्रिंग () डेटा.फंक्टर। पहचान। पहचान [स्ट्रिंग] ' आयात प्रणाली .आईओ आयात योग्य डेटा को आयात करते हैं। बायट्रेडिंग। सीएचआर आयात के रूप में बीएस आयात योग्य डेटा। बायस्टस्ट्रिंग को एसआरआर आयात के रूप में पाठ। पार्स कॉम्बिनेटर। पैरासेक शब्द :: पार्सर स्ट्रिंग

javascript - Calling a variable from a function in a different JS file -

I'm working on Chrome extension and I'm stuck. I'm not sure that this is possible, but I have to do this. Basically the user clicks the Chrome extension and opens the panel (popup html). The user is shown a list of images from the Web and users can choose the ones they want to edit. Popup.html Loads are function in popup.js popup.js and there are some variables inside those functions. Now popup.html has a button that takes you to another panel named filter.html. This is where the edit goes, I am trying to pass selected images from filters.html from popup.html and I was trying to call that array of popup.html loaded images in popup.js I am but its null Is it also possible to do wrong? When a new HTML page opens, it means that the previous HTML page loses the point of what happened, and so also tracks that the JS file runs on the same page? There is a new and improved way to use. You can store data from one page and you can read it in another page because the data wi

ios - float value from [NSString floatValue] show different result when print out -

Image
Please refer to the code below and view in the results console. NSString * strRatio = @ "0.03"; Float F = [stratio float value]; NSLog (@ "% F,% @", F, F = 0.03? @ "Equal": @ "not equal"); Result: 0.030000, not equal In addition to this I have a screenshot when I NSLog (@ "% f,% @", f, f == 0.03? @ "Par": @ "not equal"); , it is showing me f 0.0299999993 ... Can anyone explain it? Why is the result of f = 0.03 false? Why F is 0.030000 but it shows 0.0299999993 when debug occurs. edited Do: I hope the value of f is 0.03 after converting from "0.03", how can I get it? It seems that float 0.03 is represented by Even if I assign 0.03 to the float value, then I will get 0.029999993 as a result. Value is not 0.03 , as is D As shown in the second - 0.0299999993 . It shows in the log as 0.03000 default, % f 5 Displays the decimal place, so the value is being rounded

indexoutofboundsexception - Stars.java arrayindexoutofbounds -

I am trying to understand why I have received this error for about 3 hours and I have some help to get it Before my computer pays the price. I am getting this error Exception in the "main" java.lang.ArrayIndexOutOfBoundsException thread: StarsTable.checkIfStar (StarsTable.java:102) on Stars.main (stars.java 20) import java.io.buffferedReader; Import java.io.fileReader; Import java.io.IOException; Import java.util. *; Public category stars table {Private Archieist & Lt; Integer & gt; A = New Arrestist & lt; Integer & gt; (); Private string title; Private string readLine = null; Private int rows = 0; Private integer array [] []; Public Stars Table (String Filename) {try {BufferedReader br = new BufferedReader (New FileReader (fileName)); Title = br.readLine (); While ((readLine = br.readline ()) = Faucet {System.out.println (readLine); AddArray (ReadLine); Rows ++; } Br.close (); } Hold (IOException e) {System.err.println ("File not found" &

javascript - How to add data column wise dynamic in for a row? -

This issue is about the Google line chart, which appears according to the different lines i.e. the cycle I have an array of data, and length is unknown, i.e. Cycle_x I will dynamically get under data arrayCycleName = ['Cycle_1', 'Cycle_3', 'Cycle_3' 'Cycle_4', ....]; arrayModNames = ['mod_1', 'mod_2', 'mod_3', 'mod_4']; ArrayCycle_1_Data = [50,30,10,15]; ArrayCycle_2_Data = [40,20,42,44]; ArrayCycle_3_Data = [30,34,36,40]; On this .. I am using datatylet var data = new google.visualization.DataTable (); Var chart = new google.visualization.LineChart (document .getElementById ('chart')); Data.addColumn ('string', 'module name'); (I = 0; i & lt; array cache name; ling; i ++) data for. AddColumn ('number', array name [i]); The question now is how do I get the data given below using any of the loops? data = [['' circle name ',' cyclist_1 ',' cha

java - Localization in struts1 -

I have a project to support localization in the web application. The project is a web application that provides services to its users It is based on Stropes 1.2. Requirement: In the JSP page the label can be controlled according to the user's priority, i.e. the login can vary according to the user. The user can change the text of the label he / she wants to see. How can I get it in Stash 1.2? I know about struts I18n, but it's based on locale. Am I thinking that to create a separate property file for each user? Please help. In a single asset file, you can have multiple resource IDs with different user names ex: title for user1.title = user1 user2.title = title for user2 and Dynamic keys in the Create Bean: The message depends on the user login. struts-config.xml & lt; Message-resource parameter = "com.struts.MessageResource" key = "appResource" & gt; & Lt; / Message-resources & gt; In JSP: & lt

php - how to find lowest unique bidder and display username of that lowest unique bidder -

My data base is here im new in php and I do not know how the lowest specific bidder for auction is a product And I also want to display the name of that minimum unique bidder's username. Please help me but I have followed some code $ con = mysql_connect ("localhost", "root", ""); If (! $ Con) {dead ('Could not connect:' Mysql_error ()); } Mysql_select_db ("gunjanbid", $ conn); $ Sql ​​= "Select" from the bid; $ Result = mysql_query ($ SQL); $ User name = $ result ['username']; $ Serial = $ result ['serial']; $ Low_sql = "Bidmount, Username, Quote from bid (bidmount) as bid bid, where price of bid & lt; '{$ serial}' and 'bidding_code = 1' and auction = '{$ user name}' group by bmount" ; $ Lower_query = mysql_query ($ lower_sql); $ Low_bids = Array (); If (mysql_num_rows ($ lower_query)> 0) {$ lower_bid_exist = true; While ($ row = mysql_fetch_assoc ($ lower_query

javascript - Can I use chrome to update json response data? -

I do not want to change JSON files repeatedly to debug with different data. Can I use Chrome device to update data? I was searching for options in the developer tool, but no luck. I'm making some assumptions here, but I'm assuming you have Jasonson on client-side Are preparing as script. If this is so, you can edit JSON (temporarily for that tab session) via Chrome Dev Dev Tool. Just open the Dev Tools panel and select the "Source" tab: Here you can select the "Source" sub-tab to view all the scripts loaded for that page. If you are working with the JSON file, you can open it and edit it in the right pane. It is advisable that the changes made will only be affected if the existing page passes through that object again - your page will be deleted after reloading the page. This question has been solved (if only partially) here:

c++ - protected affectation operator and public copy-ctor -

सबसे पहले: संभावित कारण जिनके लिए एक वर्ग है है: ऑपरेटर = सुरक्षित copy-ctor सार्वजनिक? < P> दूसरे : निम्नलिखित डिज़ाइन पर विचार करें: वर्ग WeirdDesign {public: WeirdDesign (const WeirdDesign & amp;) {} संरक्षित: विचित्र डिज़ाइन & amp; ऑपरेटर = (कंस वर्डाडिज़ाइन & amp;) {}}; स्ट्रेट ए {टाइपिंगफेस स्टडी :: वेक्टर & lt; WeirdDesign & gt; मेरी तरह; शून्य विधि (कंस माइरिपे एंड तत्व) {// तत्वों तक पहुंच}}; वर्ग बी {शून्य रहित () (std :: unordered_map & lt; Std :: string, A :: mytype & gt; mymap; Mymap.insert (std :: make_pair ("0", ए :: मायटाइप ())); // ए को जोड़ने में विफल ()। विधि (mymap.find ("0") - gt; दूसरा); }}; जब मैं B :: mymap _ के भीतर एक तत्व सम्मिलित करने का प्रयास करता हूं, तो लिंकर ऑपरेटर = के को हल करने में विफल रहता है WeirdDesign ? क्यों? मानक कंटेनरों के कुछ कार्यों के लिए आवश्यक है कि मूल्य प्रकार CopyAssignable होगा। Std :: vector के ऐसे ऑपरेशन का उदाहरण सदस्य फ़ंक्शन है insert ।

sql - Car parking reservation availability query with date and time -

I am implementing a car parking reservation system in which a user maintains a parking space. Reservation Table Column -------------- Parking SpaceIID Vehicle IID User Id Starttime and Timeout Endtime Space table column -------- avialablespaces noOfBookings < P> User can check the available parking space with the parameter Start date , start time , expiration date , end time < / code>. If avialablespaces == NoOfBookings then parking space is not available. To find out if there is a parking space available between startdate, start-up and enddate, end time, what is the logic? By asking for parking spaces, you can get the number of parking available at a certain time for which booking Time is not present, where at the time your given time starts S or ends. BTW: Why do you split dates and time in your table? The only reason for this is that I can think that there is a possibility of being one without each other, eg. There is no time specifi

json - Google custom search api in android application -

I am trying to use Google Custom Search API for a school work and when I am trying to get results Get Jason's look, I've configured everything on the Google Developer Console and Google Custom Search Engine Control Panel, at least I think my code snippet here is qstring = " Key = "+ key +" & amp; cx = "+ cx +" & amp; q = "+ searchtext +" and alt = json "+" & start = "+" 0 "; String query = null; Try {query = URLEncoder.encode (qstring, "UTF-8") .replaceAll ("\\% 28", "(") .replaceAll ("\\% 29", ")") .replaceAll ("\\ "ReplaceAll" ("\\% 27", "'"). (Unsupported encoding exception e) {// TODO auto generated blocking block e.printStackTrace ();} URL url = null; {Url = new URL ("https://www.googleapis.com/customsearch/v1?" + Query);} hold (malformedlexception e) {// TODO auto generated blocking block e.printS

html - left align for list style type -

Image
मेरे पास list-style-type: lower-latin; & lt; ul & gt; & Lt; li & gt; एक & lt; / li & gt; & Lt; li & gt; दो & lt; / li & gt; & Lt; li & gt; तीन & lt; / li & gt; & Lt; li & gt; चार & lt; / li & gt; & Lt; li & gt; पाँच & lt; / li & gt; & Lt; / ul & gt; सीएसएस उल {सूची-शैली-प्रकार: निम्न-लैटिन; } समस्या यह है कि डिफ़ॉल्ट रूप से, सूची-शैली-प्रकार सही-संरेखित है: मैं सीएसएस के साथ छोड़े गए अक्षर कैसे बना सकता हूं? अपने उल नियम में संपत्ति list-style-position: inside जोड़ें और यदि आवश्यक हो तो मार्जिन और पैडिंग को संशोधित करें: < / div>

Display number of elements on histogram bars - MATLAB -

Is there a way to display the number of elements on each bar of a histogram in MATLAB? On a toolbar of the MATLAB plot, including a histogram plot, the data cursor Button (it looks like a blue curve with a black cross and yellow table). Click it, and then select once in the histogram - it will add explanation labels in the bar, with information about the bin counting of the bar. You can select this label and drag it into other bars, or add additional labels for other bars.

javascript - WYSIWYG Ckeditor is removing several html tags -

Recently I am having trouble with CKD It's very well in custom CMS Integrated, though it seems to separate some tags, most important: 'data-toggle' , 'data-target' and all fonts-awesom E CSS class Given that I am using Bootstrap for the templateing engine, there is no such leak, why is this happening? Example: & lt; A class = "BTN BTN-block BTN-inverse" data-toggle = "model" data-target = "# download model" href = "#" & gt; Download trial & lt; / A & gt; becomes: & lt; One class = "BTN BTN-block BTN-inverse" href = "#" & gt; Download trial & lt; / A & gt; Can anyone add a set of HTML defined tags in the ckditor? Or any other editor who will play well? In your config.js file, you can be prevented by using any stripping flag config.allowedContent = true; Reference: Similar questions related to CSS classes: CkEditor will still strip cert

objective c - Cannot fix the viewcontroller to landscape -

I have a landscape (like a. Is there any solution for this? Or did I miss something? Note: I am using Xcode 5 and iOS 7. Set the device orientation of the deployment information on the llanzap, the problem will be solved. < / Div>

how to call the onbeforeunload in link click event jquery? -

I have a div tag with a text box and there is a link button outside the div I * Im using the datatable JS and custom column "edit" adding as a link, the href = "#" .. If IM clicks on links without having to enter any data it Meaning the Onbeforeunload function should not be called. Before putting any data into the text box before clicking on Save, click on the im link that means it should call the on-win function. And you have to show messages like saving your changes. & lt; Div id = "input form" & gt; Details & lt; Input type = "text" id = "description" placeholder = "enter details ..." name = "description" /> & lt; Input type = "submit" value = "save" /> & Lt; / Div & gt; & Lt; A href = 'www.google.co.in' & gt; Link & lt; / A & gt; $ ('# inputform'). ('Change keyboard keyboard', 'input, text, select

multithreading - c++ multi threading priority implementation failed -

=) I'm a new user here, and I'm new to c ++, That's why this is a difficult task for me ... So I'm asking you some questions! =) I am doing a job for the school, who asks me to apply the threading priority to this: #include & lt; pthread.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; schedule.h & gt; Int shade_yilild (zero); // parameter for print_function Struct char_print_parms {char characters; // char int count to print; // time to print); Zero * char_print (zero * parameter) {int i; Struct char_print_parms * p; P = (straight char_print_parms *) parameter; (I = 0; i & lt; p-> count; ++ i) {fputc (p->; character, stderr); Sched_yield (); } Return tap; } Int main () {pthread_t thread1_id, thread2_id; Struct char_print_parms thread1_args, thread2_args; // 200x to print a new thread. Thread 1_args.character = 'x'; Thread 1_args.count = 200; Pthread_create (& thread1_id, NULL, & char_print, and thread1_a

Regex to eliminate a word -

मेरे पास तार हैं BadRequestException ("हैलो वर्ल्ड") BadRequestException (BadRequestException :: $ errors- & gt; संदेश) ConflictException (ConflictException :: $ errors- & gt; sldkf) ConflictException ("skdljf") मैं एक रीजक्स कैसे जोड़ूं जो मुझे ये दो देता है: / अपवाद (? त्रुटियाँ) / / Pre> लेकिन यह मेरी आवश्यकताओं के अनुसार काम नहीं करता। धन्यवाद इसका पता लगाया। मैंने अपवाद (?!। * :: \ $ त्रुटियों) का उपयोग किया है

mysql - error #1452 - assign FK twice for the same PK -

I get this error - # 1452 - Child row can not be added or updated: a foreign key obstacle fails She goes. Do I think I try to hand over multiple foreign keys to a primary key, or is not it? My table looks like this User ===== UID (PK) Friend ====== UID (F.K.) User Order ID = ===== Oder ID UID (F.K. of UserUID) & lt; - It is not certain whether this is possible or not You may order And trying to enter the FP user ID value to the friend, which is not present in the user table.

asp.net mvc - Call SignalR Client method from normal C# class -

I am trying to add signal R to my MVC project. I need to call the signal and client method from my class library. I used the code below. Public class CommomHubManager: ICommomHubManager {readonly IHubContext References; Public CommomHubManager () {Reference = Helpers. the provider. Hubcontact Provider & lt; Hub Notifications & gt; .HubContext; } Public Action AddUserToGroup (string group name) {Return function. Factor STARTNU ((=) = & gt; {context.Clients.All.addUserToGroup (groupName);}); }} This is not working, but when I try to call another hub class method from WebAP, its work is fine. I want to know that it is possible to call the Signal R client method from the normal C # class? preference = globalhost.com connectionManager.gatehbkontex & lt; CommmHub Manager & gt; (); Context.Clients.All.Send ("Admin", "Stop Chat"); You can find more information in

css - Perspective required for proper rotating animation -

I had a problem where I used to rotate the two parts of an image in the opposite direction of the y-axis with these images Two animations were trying: @ - WebKit-keyframe first {0% {-webkit-transform: rotateY (0); } 100% {-webkit-transform: rotateY (-90 degrees); }} @ -WebKit-keyframe seconds {0% {-bbkit-transform: rotated Y (0);} 100% {-webkit-transform: rotated Y (90 degrees); }} Despite the different values ​​for the last keyframe, two animations rotated in one direction correctly tell me that to control my code, I perspective < To implement / code> is necessary to create an effect function (to check the checkbox which will apply and remove perspective from the 3D space): - Chrome Only I'm curious about this Volved. From MDN: Perspective CSS property, Z = 0 determines the distance between the plane and the user in order to give the 3-D element in order. Each 3D element z & gt; 0 gets bigger; Each 3D-element z & lt; 0 becomes the strength of the

java - Android htmlcleaning -

I use this code to read an html page, but I have an error ... how do I solve it Do you? Error: Fatal exception: main process: com.example.nuovo, PID: 1615 java.lang.RuntimeException: Unable to initiate the activity ComponentInfo {com. example. nuovo / com.example.nuovo.Nuovo_Activity}: android.os.NetworkOnMainThreadExceptionAndroid.app.activatrid.form launchery (activityTrad.sgans1919) android App ActivitivedAndal Launch Activity (ActivityTrad.Java 2245) on Android.AP .ActivityThread.access $ 800 (ActivityThread.java:135) Code: Package Com.example.nuovo; Import java.io.IOException; Import java.net.MalformedURLException; Import java.net.URL; Import org.htmlcleaner.CleanerProperties; Import org.htmlcleaner.HtmlCleaner; Import org.htmlcleaner.TagNode; Import org.htmlcleaner.XPather Exceptions; Import android.util.log; Public class test {public string getRis () throws malformedlexception, IOException, XPatherException {string result = "aa"; Log D. ("Proge di m

excel vba - How to undo an action performed via VBA -

I have a simple bit VBA code that I wrote, which is pushed into a button when only three columns in a sheet Removes. When the button is pressed, the columns are removed. This part works fine what I would like to do is to make this action reversible through the STOCK undo button in Excel. At present, removing these lines in any way (which I know) is not able to cancel, which means that if the button is pushed on the crash then the sheet should be exited and opened again. This is my current code, please feel free to critics, I am not familiar with VBA best practices, though I am learning. Private Sub Command Button 1_Click () Dim Alias_Adds as Worksheet Set Alias_Adds = Sheets ("Alias_Adds") MSG1 = MsgBox ("Are you ready to delete the Verification column? (A, F, and G?) ", VbYesNo," "If MSG1 = vbYes again with aliases - Alge_Adds.Columns (" A "). The entire column. Delete 'is the error, which is for error Alias_Adds.Column ("E:

sql - Not taking into account condition -

Suppose i have a parameter @ user id, this can be 0 (no user specified) or own id The structure of the query is as follows: If @UserID & gt; Select 0 ... where UserID = @ UserID ... else if select @userid = 0 ... ou ... What do I need to do the following structure Select ... where the user id & gt; 0 then userID = @ USIDID and ignore this condition ... thanks Set as parameter value instead of 0 (zero) Announce @id int set @id = null * From users (id = @ Id) or (@IID is empty)

javascript - Running php from user onclick -

I'm not sure how I can explain it, but here's a website for my attraction. That's a historic village among my categories. When the user opens the pages of the historic villages, then they get a list of the villages displayed from the database. The way I display them: a picture of attraction by name. What do I want that the user is unable to click villages (by creating a clickable link to name and photo) and redirect the user to a page which will run a PHP script which will display more information than the database selected village In this way I will have only one page for all the attractions, which will display the individual notifications to the user every time, all the pages will be in the link Instead of Hnt. This is my code which displays the fragments of the villages: $ sql = "select name", `location`,` description`, `air Haunch `,` imlink`, `pagilink`" "` from charm '' 'WHERE` category` =' histavi '' '; $ Resul

coq - Formalizing time and space complexity requirements -

एक ???? एक बी ??? एक, ????, बी ?? 0 एक ???? ए???? ! Q r â ???? एक ????, एक = क्यू एक ?? बी + आर ए ?? § आर एंड एलटी; बी निर्भर प्रकारों के उपयोग का एक मानक उदाहरण है मैं इस प्रकार का विस्तार कैसे कर सकता हूं ताकि यह समय और अंतरिक्ष जटिलता आवश्यकताओं को भी व्यक्त कर सके? "post-text" itemprop = "text"> Nils Anders Danielsson समय की जटिलता को ट्रैक करने के लिए अगदा में एक मोनद: उप-कम्प्यूटेशंस जो अध्ययन की जटिलता के लिए "प्रासंगिक" स्पष्ट रूप से चिह्नित होते हैं, उनमें से प्रत्येक को "समय की एक टिक" ले कर स्पष्ट रूप से चिह्नित किया जाता है। इन सब-कंप्यूटेशन्स को मोनद प्रकार के सूचकांक में टिक की संख्या पर नज़र रखने के द्वारा एकसाथ जोड़ दिया जाता है। विवरण उनके कागज में वर्णित हैं। < / div>

c++ - Trying to translate formula for blending mode -

I am using opencv c ++ to create the compositing mode such as photoshop In this mode I want to create an overlay, I find my alternative in OpenCV, in which I found the path, but as an overlay I want to use the overlay method in it. (target = 0.5) * (1 - (1-2 * (target -0.5)) * (1-blend)) + (target & lt; = 0.5) * ((* 2 * target) * Blend) Can anyone explain this formula for implementation in OpenCV C ++, how can I easily implement it for implementation Anyone can understand or create any in advance function for the second easy way: p is actually overlay blending Is multiply to light colors First of all, provided by you The author of the link assumes that a pixel color as a value between 0 and 1 Imagine that you want to combine 2 mages img1 and img2 . The formula states that if a value in img1 is target> 0.5 then the resultant value (1 - (1-2 * (target -0.5)) * (1-blend)) for mixed image where blend < The value of the pixel of code> img2 is

javascript - Need to add multiple answers to a single array -

I have to add multiple questionnaires to use the same code / ARAME. How can I do this? Answer the questions [0] = ["Apple", "Test"] // questions; Answer [1] = "Dynamic HTML"; Answer [2] = "Netscape"; Answer [3] = "Common Gateway Interface"; As you can see, I have just tried to add my second answer to the code array for a second quiz but this does not recognize the answer. What is the best way to do this? (There is a "or" command or something like that? Here is my complete code: // var numques = 4; // Insert each question var numChoi Enter the number of questions displayed in the North field var answers = new array (4); // questions [0] = ["apple", "test"]; Answer [1] = "Dynamic HTML", "Test"; Answer [2] = "Netscape", "Test"; Answer [3] = "Common Gateway Interface", "Test"; // Anything belowChange here ... function getScore (form) {var s

c# - Get current user's name and user id -

I will not do ASPX trying to accomplish this simple task. I see the following code in some CS files that seems to be the current user and I think this is a standard method in an asp but may be incorrect: < p> CS: user user = (user) Context.Items ["CurrentUser"]; I have tried this kind of thing from other posts here, but maybe the system is different or setup is different? Then I do not know. var currentUser = Membership GETUser (User.Identity.Name); String usernames = currentUser.UserName; // ** username grid user id = current user Provider user; // ** Get User ID Do anyone know how to get the current user's name and user ID on the basis of above? It depends on how you handle users in your website. If you use ASP.NET built in user management, then User.Identity.Name will get you the currently logged in user name. Other stuff like (user) references. The item ["current user"] or (user) session ["myUser"] will be av

c - Fork and waiting for the childs outside the pid check -

I want to make two parallel forks and wait for them to end. for (int i = 0; i & lt; 2; i ++) {pid_t pid = fork (); If (pid & lt; 0) {fprintf (stderr, "can not fork!"); Exhaust (EXIT_FAILURE); } Else if (pid == 0) {switch (i) {case 0: // First exhaust exhaust (EXIT_SUCCESS); break; Case 1: // Another child exhaust (EXIT_SUCCESS); break; } break; } Else {// parent}} The problem is that the main program ends before the child, if I add wait (0) to the part of the other parent, then every process , So that they do not work at the same time one by one. I think I can just wait () or waitpid () after the loop, but he is not working either. I thought that after the fork, the parent continues normally, why not wait When is the loop out and if-and structure? Sorry for the upset and thanks in advance. If you add wait (NULL) inside the other original part Parents If you add wait (NULL) after the loop, the parent process will wait if you want That all childr

ios - Hides UINavigationController's UIToolbar when pop -

मेरे पास दो दृश्य नियंत्रक ए और बी है। ए में एक तालिका दृश्य है और जब उपयोगकर्ता एक पंक्ति पर नल, B धकेल दिया जाता है। B में UIToolbar self.navigationController.toolbarHidden = NO; और समस्या यह है कि जब मैं B से A से पॉप करता हूं : उपकरण पट्टी ए पर भी बनी हुई है और मुझे पता नहीं है कि कैसे निकालना है। यह हो रहा है क्योंकि आप टूलबार को छिपाना नहीं करते जब आप B से A viewController तक पॉप करते हैं बी viewController #pragma mark - #ViewVillDisappear के तरीके में - निम्न कोड का उपयोग करें / देखें: (शून्य) दृश्यविशेषताएं: (BOOL) एनिमेटेड {[सुपर दृश्यवहीआकार: एनिमेटेड]; Self.navigationController.toolbarHidden = हाँ; } तो, जब भी आप B से A viewController तक पॉप अप करते हैं, तब भी अपना टूलबार छुपाएं। ए viewController।

javascript - Google pie chart data table values -

Google website has a code for creating pie charts: google.load (" Visualization "," 1 ", {Package: [" Corechart "]}); Google.setOnLoadCallback (drawChart); Function drawChart () {var data = google.visualization.arrayToDataTable ([['work', 'hour per day'], ['work', 11], ['eat', 2], ['commute', 2] , ['Clock TV', 2], ['sleep', 7]]); Var option = {title: 'my daily actions'}; Var chart = new google.visualization.PieChart (document.getElementById ('piechart')); Chart.draw (data, options); I have a global conflict which I would like to set it to value, and for example would like to introduce a new value in the chart: var tmp = MyGlobalVariable 10; google.load ("visualization", "1", {package: ["corechart"]}); Google.setOnLoadCallback (drawChart); Function drawChart () {var data = google.visualization.arrayToDataTable ([['Task', 'Hour per day&#

Linking an External CSS Stylesheet in R Shiny -

I am making my first shiny application and I am having trouble adding an external CSS file. I have seen some references where people have explained it and have also shown example code, but I have no luck. Most of the examples I have seen that the bootstrap page is used while doing this, such as: shinyUI (bootstrap page (tag $ title (tag $ title ('example link stylesheet') , Tag $ link reel = 'stylesheet', type = 'text / css', href = 'assets / ace-shiny.css'),)) I use fluid I am doing it, and no, I know that this is my problem. My effort is down.I have confirmed that my work is not Eshika where I think that CSS file, and it is "Assets" folder. I know tags $ head bit is working, because if I cancel the Tag $ style tag, then it is applicable. ShinyUI (fluidpage (tag $ head (tag $ link (rel = "stylesheet", type = "text / css", href = "assets / styles.css") # tag $ style In this step my CSS is simple (belo

java - EntityManager.persist() not inserting values to DB -

New to JPA and Servlets. I am trying to create a student unit and using a servicelet to convert your DB I am trying to put There are no errors in the code when I go to the servlet, the browser worked without errors but the prices are not putting my DB Student Unit: - @Entity applies to the public class student Serializable {Personal Stable last long serialVersionUID = 1L; @ Id @ Generated Values ​​(strategy = generation type.eeto) Private long id; @column (drain = false) name of private string; @column (negligible = false) Private interval age; Public string getName () {return name; } Public Zero Setname (string name) {this.name = name; } Public int getAge () {return age; } Public Zero setAge (int age) {this.age = age; } Public Long IID () {Return ID; } Public Zero Set ID (Long ID) {this.id = id; } @ Override Public Ent Hashod () {Inti hash = 0; Hash + = (id! = Tap? Id.hashCode (): 0); Return hash; } @ Override public boolean equals (Object object) {// TODO: Warning - this met

linux - grep -f r t, how to make the result sort by r, not t -

$ cat r 1 2 $ cat t 22 11 $ grep -frt 22 11 आप एक स्क्रिप्ट बना सकते हैं जो स्मृति में सब कुछ रखती है, या आप एक को लागू कर सकते हैं। अपनी r फ़ाइल को एक sed स्क्रिप्ट में बदलें, जो प्रत्येक मैच के लिए एक इंडेक्स नंबर प्रिंट करता है: sed के बजाय / 1 / s / ^ / 00001 / / 2 / s / ^ / 00002 / का उपयोग करें > Grep , और उपसर्ग द्वारा सॉर्ट करें; फिर उपसर्ग को त्यागें। sed -f r टी | सॉर्ट-एन | कट-डी '' -f2- & gt; आउटपुट sed स्क्रिप्ट बनाना बहुत मुश्किल नहीं होना चाहिए; यहां एक साधारण अक्सा स्क्रिप्ट है (ओह, विडंबना!) awk '{printf ("/% s ​​/ s / ^ /% 05i / \ n", $ 0, एनआर)}' आर एंड एस; r.sed यदि आप अपने regexes में slashes है, चीजों को थोड़ा अधिक जटिल करना होगा। याद रखें कि / foo / को भी \: foo: लिखा जा सकता है, इसलिए यदि आप एक उपयुक्त सीमांकक ढूंढ सकते हैं जो आपके डेटा में नहीं आता है, तो संभवतः सबसे आसान समाधान है। < / P> यदि आपका sed मानक इनपुट से एक स्क्रिप्ट पढ़ सकता है (उन सभी को नहीं, लेकिन लिनक्स sed ठ

iOS: reachability and AFNetworking -

I have this code in your AppDelegate: - (bool) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock: ^ (AFNetworkReachabilityStatus status) {if (state == AFNetworkReachabilityStatusNotReachable) {NSLog (@ "no connection"); } Else if (state == AFNetworkReachabilityStatusReachableViaWiFi || state == AFNetworkReachabilityStatusReachableViaWWAN) {NSLog (@ "No connection"); }}]; [[AFN Network Reachability Manager Shared Manager]] StartMoning]]; Yes come back } But this does not work, I am not my log, why? block only when called reachability actually turns into you You can get the current situation like:. [[AFNetworkReachabilityManager sharedManager] accessible]

cross compile c++ on linux to windows -

क्लैग ++ main.cpp -std = c ++ 11-लक्षित x86_64-unknown-win32 -i / usr / Lib / gcc / x86_64-w64-mingw32 / 4.6 / include / main.cpp: 6: 10: घातक त्रुटि: 'स्ट्रिंग' फ़ाइल नहीं मिली # शामिल करें & lt; स्ट्रिंग & gt; ^ 1 त्रुटि उत्पन्न हुई। यह अजीब है क्योंकि: /usr/lib/gcc/x86_64-w64-mingw32/4.6/include/ssp$ ls ssp.h stdio H string.h unistd.h और इसका परिणाम वही होता है: clang ++ main.cpp -std = c ++ 11-लक्षित x86_64-अज्ञात -win32 -i / usr / lib / gcc / x86_64-w64-mingw32 / 4.6 / include / ssp ठीक है मैं लिनक्स से विंडोज़ को खिड़कियों से सी कोड संकलित करने के लिए इस्तेमाल किया: x86_64-w64-mingw32-gcc main.c और मैंने कोशिश की: < / P> x86_64-w64-mingw32-g ++ -std = c ++ 0x main.cpp भी: x86_64 -w64-mingw32-g ++ -std = c ++ 0x main.cpp -i / usr / lib / gcc / x86_64-w64-mingw32 / 4.6 / include अभी भी त्रुटियों का गुच्छा दे जैसा कि main.cpp: 70: 23: खेद, अपरिवर्तित: गैर-स्टैटिक डेटा सदस्य इनिशियलाइजर्स। मुख्य सीपीपी: 70: 23: त्रुटि: स्थ

matlab - Summing unknown number of vectors -

I have two types of matrix & amp; Say size 2000x2 The number of columns in the matrix may vary from 2 to 20. The number of rows will also be different. What I would like to do is add all the columns of matrix into a vector. How can I do this with looping through all the columns? I have tried the line given below, though if there are two columns or a 3 x 1 vector, the column etc. So it just takes the sum of the total columns. result_vec = sum (my_matrix (, 1: end)) column 1 column 2 column 3 result vector 5 3 2 10 3 11 4 18 9 6 7 22 To get the line amount, you have to summarize on the other dimension. Total (my_matrix, 2)

c# - Using Interfaces in Webforms -

I usually make an external class library for my ASP.NET projects, I refer to the project But I'm working on one of the webforms, I will create that class object and use the code behind its properties and methods: user usr = new user (); Usr.Username = "username"; Usr.Password = "password"; Usr.Register (); I am currently working with one of my colleagues who call 'bad design', especially when I make a class diagram for him. According to them, they say that this "bad design / programming is directly in the code behind a webform's file." They say that I should use the interface instead, so if there is a change in the class library then my The application will not complain about any disturbance on the front end, which means that I do not have to change anything on the front end. String user name "to" public string user ", then I should not give any error in front, some code independence or something like this: inter

java - The <split/> element may not appear on a <job/> with abstract="true" spring batch -

I have different jobs, which need to share split from parent job (many steps running in parallel) Below is the configuration & Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; Flow & gt; & Lt; Step id = "step0_2" & gt; & Lt; Tasklet Transaction Manager = "Transaction Manager" & gt; & Lt; Wheel Reader = "step0_2ItemReader" author = "step0_2ItemWriter" commit-interval = "1000" /> & Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; Flow & gt; & Lt; Step id = "step0_3" & gt; & Lt; Tasklet Transaction Manager = "Transaction Manager" & gt; & Lt; Wheel Reader = "step0_2ItemReader" author = "step0_2ItemWriter" commit-interval = "1000" /> & Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; / Split & gt; &am

xml - Serializing when class inherits list (of object) -

I have a booking class which handles a list (message) I was wondering how to serial this Message in the booking class is the property of 3 attributes, partners, transactions and versions, There are many properties of booking in my message class, Now when I want to serial New message z.partner = "company name" z.transaction = "booking" z.version as new bookmarking DM X In the form, use dim z = "1.0" x.MessageType = "c" x.CustomerNumber = "123" x.BookingReference = " 5845 "x.CustomerBookingReference =" 036,598 "x.OutwardRoute =" PEMROS "x.SailingDate =" 20,120,107 "z.Message = SaveAsXML (z) with save below xmlfunction code y.Serialize new xmlSerializer (val.GetType) as public shared function SaveAsXML (ByRef Val as + val.FileName) (objStreamWriter , Val) objStreamWriter.Close () return true dim: as in the form of booking) slow objStreamWriter as New StreamWriter ("\ ftptest \ n

Global function is not working javascript window object -

नीचे कुछ जावास्क्रिप्ट कोड है: showFullName (); // पीटर अलाली window.showFullName (); // पीटर एली इन दो फ़ंक्शन कॉल्स केवल विंडो ऑब्जेक्ट पर हैं लेकिन पहली कॉल ठीक काम करती है, लेकिन दूसरा एक नीचे त्रुटि देता है: TypeError: अनिर्धारित एक समारोह नहीं है var firstName = "Peter", lastName = "सहयोगी"; फ़ंक्शन showFullName () {console.log (this.firstName + "+ + this.lastName); } Var person = {firstName: "पेनेलोप", अंतिमनाम: "बैरीमोर", शोफ्लोनाम: फ़ंक्शन () {console.log (this.firstName + "+ this.lastName); }}; ShowFullName (); // पीटर अलाली window.showFullName (); // इसे आउटपुट होना चाहिए: पीटर एली, लेकिन त्रुटि देने वाला व्यक्ति। ShowFullName (); // पेनेलोप बैरीमोर showFullName (); // पीटर अलाली window.showFullName (); // पीटर एली ये दो फ़ंक्शन कॉल्स विंडो ऑब्जेक्ट पर हैं नहीं, केवल दूसरा वाला है पहले एक आपके स्थानीय क्षेत्र में है। लेकिन पहली कॉल ठीक काम करती है, लेकिन दूसरा एक त्रुटि देता है इसका अर्थ ह

ios - How to find string in tableview and update array? -

I'm loading tableviewcell with textview I'm loading an array Teblwu and I have Tekstfild editing and renaming There is another option in the name of I if it is the name of the same name, it already exists. At that time I am showing caution but if revert to the original name I do not want to show warning NSMutableArray * brokenCars = [NSMutableArray arrayWithObjects: @ "Audi A6", @ "BMW Z3 ", @" Audi Quatro ", @" Audi TT ", Zero]; If (isEditMode) {if ([tempstr length]> gt; {for (PlayerInfo * player broken Carr) {if ([player.playername isqualToString: tempstr]) {isPlayerExist = YES; if (occurrences & gt; 1) {CustomAlert * alert = [[CustomAlert alloc] initWithTitle: @ "" message: @ "Please select a different name" delegate zero cancellation Krenttntileः other Btntaile: @ ""] [alert show Inwu: Self. weave]; NSIndexPath * indexPath1 = [NSIndexPath Indekspathfayr search in selected road: 0]; [_playerT

authentication - Automatically logout when user deletes Android Authenticator account from settings -

I have developed an application that uses the Android Authenticator API ( Account Manager ), then I can add or remove accounts through settings screen. If I log out of my application, then I can delete the program and return the user to account activator activity . However, if the user has wiped the account manually from the settings screen, I would like to see that my app (which is running) detected this condition and automatically opened again when logged out. I thought overwriting onResume each activity method (or expansion of a new activity group) and ask Authenticator with getAuthTokenByFeatures , so when If the application is resume it will ask the user to login if the account was deleted even though I am new to Android and do not know that this is a good way. Well, I've discovered addOnAccountsUpdatedListener method in the class. By using that, I answer my question. The onCreate method of the main activity of my application: accountsListener = new On

c# - Merging word documents and preserve their formatting, header and footer -

I have trouble merging multiple word documents into single I had a scenario where I had a header and footer I am generating Word documents from html. I have around 10-15 such documents. I am personally preparing these words documents and working fine. Now, I need to generate html in all 10 pages and combine in single word report. I should preserve the formatting, headers and footers of individuals report. I tried to do it in two ways, but the success was not found: The combined html of all pages in the html page and then finally saved as a file file. Word reports for all 10 HTML files created and merged with them using Microsoft Office.Internop. I was able to merge the document but was not able to place the header, footer and formatting. Individual documents I have searched about section-break, but it is not sure How to use it. Please see if someone can guide me in the direction of possible solution or something that can help me. Thanks in advance . You P>

Ruby map/collect is slow on a large Mongoid collection -

I have a casual collection on which I run where query. Now, I want to create an array with the value of a specific field from all the documents present in the archive. For example if I have a monogid model square fu field: color, type: string end let me do something like this - red_ducks = Foo.where (color: 'red') red_duck_ids = red_ducks.map (& amp;: _ id) Unfortunately , When the result of the query is large it takes a lot of time. For example, in my case, 10,000 documents take 6 seconds. Is there any way to speed up this speed? Can not you just call different calls to your circle with _id as a property? red_duck_ids = Foo.where (color: 'red'). Specific (: _ID) will return a list of all the _id that meet your conditions and more information on you. You can also see and you can use it if you are using version 3.1 or newer.

javascript - AngularJS directive - accessing parent attribute from templateUrl method -

I have no control as items list with nested items. Item 2 Item P> Inside item instructions, I like this template url Can set: templateUrl: (tElement, tAttrs) -> TAttrs.template or '/item-template.html' This works fine, but as a parent attribute to avoid setting a template for each item I want to store template url. Obviously, the template is the same for every item. This stage has not been set yet. So I think the easiest way to implement it: templateUrl: (TELEMENT, TATRS) - & gt; Atter ('Template') or '/item-template.html' But I'm not sure this is the best way ... So my question What is the best way to achieve this? Thank you! I want to deal with this // index.jade Doctype html html included / head body h1 my site p Welcome to my super lame site. This includes / foot I have to keep markup stuff out of the code and believe the markup that you are doing

c# 4.0 - ON DELETE CASCADE not working in c# -

When I removed the primary key of the first table in the ExecuteNonQuery () is not The second table affects but when I do it with SQLiteStudio, it affects the second table. This is my SQLite code: Make Table Zdravila (ID integer primary key, NACIONALNA_SIFRA INTEGER UNIQUE NOT NULL, IME_ZDRAVILA text, POIMENOVANJE_IZDELKA text not NULL, SIFRA_REZIM_IZDAJE Integer not NULL , ATC_OZNAKA text not NULL, NAZIV_POTI_UPORABE text not NULL, foreign key (NACIONALNA_SIFRA) reference LastnostiZdravila (NACIONALNA_SIFRA)) on CASCADE update removes CASCADE; Create table LastnostiZdravila (NACIONALNA_SIFRA integer primary key, NAZIV_FARMACEVTSKE_OBLIKE text not NULL, KOLICINA_OSNOVNE_ENOTE not integer NULL test (KOLICINA_OSNOVNE_ENOTE & gt; 0), OZNAKA_OSNOVNE_ENOTE text not NULL, PAKIRANJE text not NULL, SIFRA_IMETNIKA_DOVOLJENJA text not NULL); Pargama foreign_kiz = current; and my C # code: SQLiteConnection conn = new SQLiteConnection (poveziZBazo); SQLiteCommand sqlQuery = Ne