Posts

Showing posts from September, 2012

javascript - Accessing a nested polymer element -

Assume that I have defined two custom polymer elements And then in the markup using these elements: & lt; Container & gt; & Lt; Child foo = "bar" & gt; & Lt; / Child & gt; & Lt; Child foo = "baz" & gt; & Lt; / Child & gt; & Lt; / Container & gt; As I have commented in the code, I want to use methods and / or attributes of the basic elements of the custom element ( not of a template Baby nodes) Naturally, I know that there will be more than just looping through the array, but at the moment I am not completely sure how to use each custom child as their polymer type inevitablyneeded. I hope this makes sense. Thank you! The children at the most safe time to reach the light of an element domReady () In the callback. Can not be created / ready / attached , because the element is not yet guaranteed to upgrade DOM and children. Note: "Container" and "Kids" are not v...

php - Determine if CodeIgniter active record have set a WHERE-clause -

सूू! खैर, शीर्षक को इसके बारे में अधिकतर कहना चाहिए। $ this- & gt; db-where ('सामान', $ डेटा) पहले से निर्धारित किया गया है या नहीं? मैं बाहर जाकर एक समूह बना सकता हूं मेरे अपने कोड (झंडे ect ...) के परीक्षण की, लेकिन मैं जानना चाहता हूं कि किसी को भी यह करने के लिए कुछ तेज़ और आसान तरीका है! धन्यवाद अग्रिम! [संपादित करें - 24-अप्रैल -14] यह मेरा अपना कोड है मेरे पास चर है जो null , स्ट्रिंग या array हो सकता है वे $ श्रेणियां और $ बजट हैं। इसलिए यदि बजट को 100 $ पर सेट किया गया है और वर्ग को सामान पर सेट किया गया है तो मुझे db- & gt; or_where का उपयोग करने की आवश्यकता होगी, लेकिन केवल अगर इनमें से एक सेट है, मुझे केवल db-> gt का उपयोग करने की आवश्यकता है इस मामले में यह बहुत सरल है कि यह जांचने के लिए कि पहले सेट किया गया है, लेकिन क्या होगा अगर अधिक मूल्यों का उपयोग किया जाए? मुझे आशा है कि आप इस बात को प्राप्त करेंगे:) हाँ आप आसानी से यह निर्धारित कर सकते हैं कि कोई भी खंड कहाँ सेट है या नहीं । कोडइग्नेटर में सक्रिय रिकॉर्ड वर्ग, ...

object - Possible to have a JavaScript method to handle undefined properties? -

क्या काम करता है: जावास्क्रिप्ट ऑब्जेक्ट जैसे जैसे var obj = {var1: "एक"}; मैं इसे निम्न तरीकों से एक कॉल कर सकता हूं: console.log (obj.var1); console.log (obj [ 'var1']); क्या विफल: यह विफल हो जाएगा: console.log (obj.var2 ); क्योंकि var2 गुमनाम ऑब्जेक्ट की कोई संपत्ति / चर नहीं है, इस प्रकार, अपरिभाषित कंसोल लॉग में मुद्रित होता है। मेरा लक्ष्य: मैं क्या करना चाहूंगा एक फ़ॉलबैक फ़ंक्शन जो स्वचालित रूप से कहलाता है जब कोई मेल / प्रॉपर्टी / वेरिएबल पाया जाता है। उदाहरण के लिए जैसे कुछ: var obj = {var1: "one", __propertyNotFound__: फ़ंक्शन (नाम) {यदि (नाम == "var2") "दो" वापस; और नल वापसी; }}; दुर्भाग्य से मुझे कोई भी समाधान नहीं मिला। मेरा प्रश्न: एक जावास्क्रिप्ट नौसिखिया होने के नाते, यह मेरा प्रश्न एक गूंगा प्रश्न और पूर्ण गलत दृष्टिकोण या हो सकता है यह समझ में आता है और वास्तव में इस समाधान का समाधान है? अच्छा, वास्तव में स्वचालित नहीं होगा लेकिन आप ऐसा कुछ कर सकते हैं: var o...

vector - Drawing from different distributions without looping in R -

The way I am attracted, I want to vector it. Suppose I have a vector of parameter values ​​for Possession, and for each parameter, I want to make 1 sample. Is there any way to do this without looping? You must specify the vector for each function argument to get vector results: & gt; About the first argument, see: Blockquote> The length of the result is determined by n for rpois, and There is a maximum length of numerical standards for other tasks. The length of the recycled result for numerical parameters other than n only the first elements of logical parameters are used. If you need multiple draws at each level, then you mapply (or Vectorize ) function: & gt; Maplei (Ruppes, Representative (4,4), Lambda = C (1,10,100,1000)) [, 1] [, 2] [, 3] [, 4] [1,] 0 8 78 1016 [2,] 0 10 106 1044 [3,] 1 14 97 1004 [4,] 0 13 94 983

dart - Regex to match a string ignoring \" -

I currently have this regex "[^" *] " I'm testing this string again (I'm using it so it has not been encoded yet!) "This one The test is \ "text file \" "This is a test \" text file \ "" is currently matching it " This is an exam \ "" "This is a test" " I think it will be the following matches "This is an exam \" text file \ "" This is one, basically I match it to something that starts with "and ends", but ignoring anything in the middle \ ", \" "Test file \" test \ ". Then the best way to do this depends on the matching capabilities of your regex engine (among them Different support for many different features) are only for a bare-bones Reggae engine, which does not support any back-end capabilities, this is what you want: "([^" * * \\ ") * [^"] * " This will match a quote, followed by...

ruby on rails - How to output values in hash inside JavaScript array? -

मेरे पास हथेली की एक रूबी सरणी है जैसे: [{tour_no = & gt ; 1,: कब्जा = & gt; 143,: चिह्न_ओफ़_लिफ़ = & gt; 133,: निहित = & gt; 166,: अनुपयोगी = & gt; 136}, {: tour_no = & gt; 2,: कब्जा = & gt; 145,: sign_of_life = & Gt; 171,: निहित = & gt; 166,: अनुपयोगी = & gt; 136}] मुझे एक JavaScript ऐरे के अंदर : tour_no के मानों को आउटपुट करना है चार्टिंग लाइब्रेरी का उपयोग करने के लिए। मेरे HAML टेम्प्लेट में कुछ रुबी कोड को एम्बेड करके मैंने कोशिश की है: categoryAxis: {categories: [# # occupancy_by_tour.each] करो | यात्रा | मैं क्या चाहता हूँ (जावास्क्रिप्ट में): categoryAxis: {tour_no] end}], मुख्य ग्रिडलाइनों: {दृश्य: झूठी}}, श्रेणियों: [1, 2], // एक सर्वेक्षण के लिए टूर गणना सेट करें यहां। mainGridLines: {visible: false}} मैं वर्तमान में क्या कर रहा हूं: categoryAxis: {categories: [[{tour_no = & gt; 1 143,: चिह्न_ओफ़_लिफ़ = & gt; 133,: निहित = & gt; 166,: अनुपयोगी = & gt; 136}, {: tour_no = & gt; 2,: कब्जा ...

ios - Creating a class cluster in objective c - methods called on abstract super class? -

I am trying to create a cluster cluster for a UITableViewDatasource, my interface looks like this: @interface ArrayDataSource: NSObject & lt; UITableViewDataSource & gt; - (id) initWithItems: (NSArray *) Item Cell Identifier: Configure (NSString *) cellIdentifier; Call Block: Block (Configure TableViewCellConfigureBlock) configuration; - (id) initWith2DArray: (NSArray *) array section identifier: Configure (NSArray *) cellIdentifiersCallBlock: (TableViewCellConfigureBlock) block configuration; - (id) MadAttindAppath: (NSIndexPath *) indexpath; Internal interval, the intangible square looks like this: @implementation ArrayDataSource - (ID) initWithItems: (NSArray *) Item Cell Identifier: (NSString) *) Cell Identifier Configure CallBlock: (TableViewelle Config Blocks) ConfigurationBlock {Return [[SingleArrayDatasAloc] with InuitHat Item: Item Cell Identifier: Configure Cell IdentifierCellBlock: ConfigurationBox]; } - (ID) initWith2DArray: (NSArray *) array section ide...

asp.net mvc - MVC/SPA Authentication Scenarios for Azure AD -

These are the application types and scenarios that support Azer Eddy: > I have two questions: I would like to understand where my scenario fits below. I think I need to use the JWT token and it seems that the original application is closest to the web API, but to give me client side angel MVC resources (HTML templates, controller and rest service) ASP.NET MVC application is required. Which closest down to my scenario: I used a multi-tenant finger (ASP.Net MVC 5 ) And the rest of the web API 2 will be protected with AZUR Edi. I would like tenants to select firstTanant.com, smt.firstTanant.com, like my domain names or first tenant like MySaaS.com, second center. MySaaS.com or MySaaS.com/firstTenant, MySaaS.com/secondTenant or the same domain naming scheme. I will use some IoC containers to add optimization to my SaaS application or to have specific functionality for each tenant (GUI and Business Logic and DB). I will use and asp.Net MVC application that customi...

(ARM assembly) Shifting a register right 1 sets all bits to zero -

I think I am going crazy I am trying to write a function which is the hardware floating point in the ARM assembly Imitates. I have the function float simulate_fp_add (float, float) which currently looks like this: .global simulated_fp_add .type simulated_fp_add,% function simulated_fp_add: push {r3 , R4, R5, R6, LR} mov r0, r0, lsr # 1 pop {r3, r4, r5, r6, pc} My main file (simplified) Just calls my ARM function two floats arbitrarily and the result is in decimal and binary: #include & lt; Stdio.h & gt; Float simulate_ff_ed (float, float); Zero prt_bin (unsigned int, unsigned int); Int main () {float x, y, z; Unsigned int a, b, c; Association {float f; Unsigned int i; } U; X = 125; Y = 0.5; U.f = x; A = u.i; U.f = y; B = u; C = simulate_ff_ed (a, b); U.f = c; printf ("simulated_fp_add (% d,% d) =% f \ n", a, b, u.f); printf ("result in binary:"); Pret_bin (c, 32); Putchar ('\ n'); Return 0; } Zero prt_bin (unsigned int value, unsigned ...

HOWTO: Cross-Operating-System Large File IO in C? -

In short: Large file support in cross-operating system, C is bad Target: I am trying to create "One Way" (most likely macro based) to give large file support to 32 bit and 64 bit. Ideally, a # macro wrapper of # ifdef, # (n), define, etc. of Typedef can allow the original large file support as a #include library or set of macros defined. Research: File operations of posics are performing well in BSD / Mac / Linux for 32 and 64 bit IO, which is more than normal 2 ^ 31 size, but With rings or mingow on windows, I can not take advantage of these calls due to M $ Foolish implementation of POSIX (if we want to call it ...) I createFile (), ReadFile (), WriteFile () on Windows I'm leaning towards using, but this method and data Open (the POSIX in terms of Rkaron) / read is completely different use () / write () / (stop) / etc. Question: After beating my head against my keyboard, and many text books, I have decided to see all your people: you guys How do I go ...

ios - Am I opening my database the right way? -

I have a database manager class that works to create and open DB in my app, and when it is needed Then the 'context' is handed over. The problem is that openWithCompletionHandler is async, so the OpenDatabase call returns immediately, so my initial view controller is trying to get data from a database that has not been opened. My solution is to pass the initial VC by the OpenDatabase method and call it back to the VC in the code block block. Therefore, my initial VC basically calls the caller to open the database manager, then sits and waits, until the call is returned, then the data is required to be displayed. It works fine and there is no delay in showing in the data. Is there a normal way to do this? I want to learn the best method instead of jury rigging which works, I tried to read various searches and Apple docs and could not find the answer. If I see something clearly in the document, please tell me there. Thank you! "Is there a normal way to do ...

ios - HTAutocompleteTextField crashes -

Image
I'm trying to use for iOS. I set the text field using the interface builder. My header file contains the necessary data source and delegate protocol, and set the data source / delegate to self in my controller However, Hit the call to set up representative or data source app accidents. I have clearly checked to ensure that I do not have any zero HTAutocompleteTextField . Has anyone experienced this issue? You need to make sure that you set the square of the view in the interface builder For HTAutocompleteTextField this can be done in the right hand side panel. (screenshot officially above Is a crop.)

python - What is the Translastion Process of Java? -

So my question is about Java's translation process today. I understand the general translation process, but I'm not sure How does this apply to Java Where does the language related analysis happen? When is the symbol table created? When is syntax analysis and what is the syntax tree? The one who is already able to research and understand that Java source code is translated into an independent byte-code via a JVM or Java virtual machine. Does it go through a classical analysis? I also know that after translating it into byte-code it has been translated into machine code but I do not know how it progresses after that. Last but not least, is Java's translation process different from C ++ or Python? When you compile a Java program, all translation processes are done. It is no different than compiling the C ++ program or any other compiled language. The biggest difference is that this translation is targeted for Java byte code language rather than assembly or ...

asp.net - Need to display total price in gridview -

Just trying to display my total price from a column in my footer line here is my code that trying But also it does not seem to be going through it when I put a brake point in subgvPayments_RowDataBound (byVal Sender, ByVal E as GridViewRowEventArgs) as the object Row.Roup = Data ControllerView.Data then the total portion of the unit part and volume total Add to the invoice Total + = Convert. ToDecimal (DataBinder.Eval (e.row.DataItem, "Total")) ElseIf e.Row.RowType = DataControlRowType footer then E. Ro Seals (0). Text = "total:" 'For footer, display the running values ​​e.Row.Cells (5). Text = invoicelet Toaster ("c") e. Ro.kel (5) .HorizontalAlign = HorizontalAlign.Right E. Ro.fonts.bold = True and End and SE If you need any of your more codes, just ask! I like to use a method which does not need to handle any event is. It uses only a TemplateField and some different functions. In your GridView, create columns like this: & lt; A...

php - How do I upload directly to YouTube without uploading to server first? -

I have tested and used Google's code sample. Based on this, if I use the upload file API of HTML5, then I must first upload the file to the server, first post the name of the video in Google's Resumable Upload PHP file, right? If so, that means a very long upload process because I'm uploading it to two servers continuously. So, is my question title possible? If so, please go to the right direction or simple tutorial using Youtube API v3 to start me. Thanks a lot! PS I have heard about the Zend Framework, but I do not want to install the whole thing to use a simple YouTube upload. Please guide me by increasing the usage of Google's code sample. Two possible approaches Browser based upload via YouTube API v2 (April 2015 is to be removed) COS with API V3 Upload

java - ListView item onItemClick is being called via onClickListener -

In my list, I have items that have a button inside, currently whenever I try to click the button So this itemclick The code below is inside the getView holder.btnad.txt (tg); Holder.BTNAD.SenTextClickLister (New OnListList () {@Override Click Public Zero (see V) {Ent ID = V. GetID (Toast). GetParent () getActivity (), "Click this button Done ", Toast LENGTH_LONG) Show ();}); Here is onMeTemClick, it is excluded from the adapter. Horizontal Liquidview HLV = (horizontal listview) view. FundwiIID (R. GalleryAdapter GA = New GalleryAdapter (offer itemized fragmentation, result); ga.setListView (HLV); hlv.setAdapter (GA); hlv.setOnItemClickListener (New OnItemClickListener) {@Override public void onItemClick (adapter view & lt; ? & Gt; Parents, View View, Integer Status, Long ID) {related offer relOffer = (relatedformer) parent.getAdapter () .getItem (status);;}}}; You can not use OnItemClickListener with the list without this effect Instead of interna...

ruby - Net::FTP and open-uri hanging while trying to put binary file to from URL to FTP server -

I have a scenario where I have an S3 URL that contains binary content that needs to be transferred to an FTP server is. I am using net :: FTP , open-yurry and Ruby 2.0.0-p353. requires net / ftp 'Required' Open-Yuri 'net :: FTP.open (x, y, z) do | Ftp | Ftp.putbinaryfile (open (an_s3_url), 'remote_filename', 4096) The code above is a temporary open-uriXXYY - * temp file is created Dyer, but then hanged. I have no idea why. Interrupting the function causes the following trace to occur: home / ubuntu / .rvm / rubies / ruby-2.0.0-p353 / lib / ruby ​​/ 2.0.0 / net / Ftp.rb: 434: 'Accept' in: /home/ubuntu/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/ftp.rb:434:In / home / 'Transfer' Ubuntu /. R.V.M. / Ruby / Ruby 2.0.0-P353 / Lib / Ruby / 2.0.0 / Net / FTP RB: 543: in Stobarini / Home / Buntu /. Rubies / ruby-2.0.0-p353 / lib / ruby ​​/ 2.0.0 / net / ftp.rb: 199: /home/ubuntu/.rvm/rubies/ruby-by_bb/ From 2.0.0-p353 / lib in `with_binar...

fork - In multi-core machine, Linux OS, when process scheduler will migrate one process to another cpu -

मेरे प्रोग्राम में, जिसका आरएसएस 65G है, जब कॉल फोर्क , sys_clone-> gt ; Dup_mm- & gt; कॉपी_पृष्ठ_आरेन्ज 2 सेकंड से अधिक का उपभोग करेगा इस मामले में, एक सीपीयू 100% sys जब निष्पादित कांटा, एक ही समय में, एक धागा काँक खत्म होने तक सीपीयू का समय नहीं मिल सकता है। मशीन में 16 सीपीयू हैं, अन्य सीपीयू बेकार है। तो मेरा सवाल है कि एक सीपीयू कांटा में व्यस्त था, क्यों शेड्यूलर इस सीपीयू पर अन्य निष्क्रिय सीपीयू पर प्रतीक्षा कर रहा है? सामान्य में, कब और कैसे अनुसूचक सीपीयू के बीच प्रक्रिया माइग्रेट करते हैं? आरएसएस 65G है, जब कॉल फोर्क, sys_clone- & gt; dup_mm- & gt; copy_page_range 2 सेकंड से अधिक का उपभोग करेगा मौजूदा कोड की कांका (या क्लोन ) कर रही है, तो नई प्रक्रिया के रूप में प्रतिलिपि होना चाहिए। नया मिमी बनाता है और वास्तविक प्रतिलिपि बनाएं। copy_page_range पर कोई प्रत्यक्ष कॉल नहीं है, लेकिन मुझे लगता है कि इसे dup_mm में लिखे जा सकता है और इसे copy_page_range पर कॉल किया गया है। dup_mmap में नया mm और पुराने oldmm दोनों ...

Status bar height in Android 10" tablet -

Image
I want to get the display height of an activity. However, the snippet also includes the height of the status bar in the display height, which can be obtained from the following: int screenhigh = context.greatresisance (). GetDisplayMetrics () HeightPixels; What do I want to say that the altitude from the top of the screen to the bottom of the navigation bar (eg, Nexus 4) or the bottom edge screen (eg, Samsung Galaxy S4 ) So what I have to do, get height pixels from snippet from top to bottom, and then decreases the height of the status bar int screenHeight =! [Context.getResources () GetDisplayMetrics () HeightPixels] [1]; Int Position BarHeight = 0; Int resourceId = context.getResources (). GetIdentifier ("status_bar_height", "dimen", "android"); If (resourceId> 0) {statusBarHeight = context.getResources () GetDimensionPixelSize (resourceId); } Int displayableHeight = screenHeight - statusBarHeight; This snippet works correctly only o...

Get first letter of a word using PHP -

Is it possible to set variable validation only if the S in the front of the variable? Example in my code: $ a = "S0225"; $ B = "700 S4"; If (SRPO ($ A, 's')! == incorrect) {"echo"; // will pass this for it} if (SRPO ($ B, 'S')! == incorrect) {echo "PASS"; // For this reason, why is it too close, while I just want the beginning of the variable for the beginning of the S} You can also use it for this purpose if (substr ($ string_goes_here, 0, 1) === 'S') {// Pass}

html - Jquery content tab showing white space -

I have used a jquery content tab plugin in my project (content, company, founder, team, appreciation, career, philosophy ) Has 6 tabs. When I click on another tab after clicking on the company tab, there is a white space on the content (in chrome). How can I remove that white spot ?? Here's my link. You use float: left in the container but Miss cleanfix. You can add overflow: auto to company element or add clear divisions. And the glory that has said is right, you should not use UL to become a container.

django - "urls" function sometime included in urls.py -

Why can you see in some urls.py files url (..) In and more you (..) . For example urlpatterns = patterns ('', url (' urlpatterns = pattern (' ', (' Article Include in '', ('article.urls'))) Pattern () url () Alternate uses are going forward, however, pattern will be disliked and you will always be disliked by Url to see: The second thing is that the pattern provides the addition of prefix parameters automatically u Wrapping plain topless in url () in rlpatterns . I think it would be good to remove it and use url () . So you should always come in the habit of using url .

c++ - Allow only numbers from 0 to 1 -

I have this down but if I put a letter, I get an infinite loop. What is the proper way to do this is that it only accepts 0 to 1 numbers, and no letters or other characters. It should accept numbers 0.5 between 0 and 0.5 as 0.5 int alphaval = -1; Cout & lt; & Lt; Enter the number between 0 and 1: "; Cin & gt; & Gt; Alphaval; While (alphaval & lt; 0; alphaval & gt; 1) {cout & lt; & Lt; "Invalid entry! Please enter a valid value:"; Cin & gt; & Gt; Alphaval; } Note that will be in std :: cin Bad situation if you enter unexpected type values ​​(such as when expected interfaces are expected). If a stream is in an invalid state, it will also fail to read valid inputs, and the loop will run infinitely, it seems that is your case, so the stream needs to clear the and stream, Because the stream did not have invalid input, you have to leave it (using the ignore function): double alpha; // It should be double or float ...

symfony - Symfony2/Twig - Need to use |nl2br for spaces and |raw blog body in twig, can this be done? -

I am using nl2br filter on blog body to put in space. Is it possible to use another filter at the top of this? For example, I am at the top of this. How do I add raw filters? %} For% blog%} & lt; P & gt; {{Blog.blog | nl2br}} & lt; / P & gt; {% Endfor%} You can use your filter in series, therefore : {{blog.blog | Raw | nl2br}}

rotation - "Distance" (or magnitude) between two quaternions? -

I would like to find "distance" between two quaterions. By "distance" I mean a single value, not another quatrainnoy (this difference will be, no distance, and I know how to do this: inversion (q1) * q2). I need to apply more. For physics, the torque is moved away from its original angle. I do not understand the quadrangles involved, so a code based example would be most useful. I have noticed many other questions but I have no doubt that the answer to my question, or at least I do not understand it. Any help would be greatly appreciated :) int quaternion qd = Inverse (q1) * q2). The angle between q1 and q2 angle = 2 * atan2 (qd.vec (). Length (), qd.w ()) Note: signed Here "angle" , It has an angle of rotation from q1 to minus q2 by arc.

php - MySQL delete rows from other tables if deleted from main table -

I've added a custom table in a WordPress DB named wp_likeandfollow, it has 4 columns id ==== following_ id ==== follower_ id ==== network_id here follower_id and the following_ id real ID and users can have duplicate entries. I would like to make an inquiry that if the administrator deletes a user from the admin panel, then all the entries of that user should also be deleted automatically in the likeandfollow table, and I want to do this with MySQL You can use a trigger for this. Delete the trigger after removing it on wp_users for each line; Create likes_and_follows wp_likeandfollow WHERE wp_likeandfollow.following_id = old.id; END Where old.id will be in this case wp_users.id .

java - Maven: How to include ${project.version} in multi-module project -

मैं maven 3.2.1 mvn - संस्करण अपाचे Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09: 37: 52-08: 00) Maven घर: /usr/local/Cellar/maven/3.2.1/libexec जावा संस्करण: 1.7.0_55, विक्रेता: Oracle निगम जावा घर: /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre डिफ़ॉल्ट स्थान: hi पर, मंच एन्कोडिंग: UTF-8 ओएस नाम: "मैक ओएस एक्स", संस्करण: "10.9.2" , मेक: "x86_64", परिवार: "मैक" मेरा मॉड्यूल संरचना projectA / pom.xml कोर / पोम। एक्सएमएल व्यवसाय / पोम एक्सएमएल हठ / pom.xml आराम / pom.xml federated_services / pom.xml PROJECTA / pom.xml & lt ; ग्रुप & gt; com.org & lt; / ग्रुप & gt; & LT; artifactId & gt; PROJECTA & lt; / artifactId & gt; & LT; पैकेजिंग & gt; पोम & lt; / पैकेजिंग & gt; & LT; संस्करण & gt; $ {global.version} & lt; / संस्करण & gt; & LT; गुण & gt; & LT; global.version & gt; 1.0-स्नैपशॉट व LT; /global.versio...

opengl es - How to use GraphicBuffer in android ndk -

I'm asking it in the context of the answer to my question I was trying to create code which uses graphic buffer Used with NDK-R9D but it is saying that GraphicBuffer has not been declared in this area. The same comment for EglCreateImageKHR and glEGLImageTargetTexture2DOES. I've added EGL / eglext.h and GLES2 / gl2ext.h. I tried to include UI / GraphicBuffer.h but it is not taking it. Can any additional header file be added? I added the code below to avoid using glTexSubImage2D (). graphic buffer * pGraphicBuffer = new GraphicBuffer (frame_width, frame_height, PIXEL_FORMAT_RGB_565, graphic buffer :: USAGE_SW_WRITE_OFTEN | Graphic Buffer :: USAGE_HW_TEXTURE); // Lock buffer to get a pointer unsigned character * pBitmap = NULL; PGraphicBuffer- & gt; Lock (graphic buffer :: USAGE_SW_WRITE_OFTEN, (zero **) and peatmap); // Write a 2D image in the PDMAP MMPP (PBitMap, Frame_Bufer, frame_width * frames_height * 3); // OpenGL ES to unlock it using pGraphicBuffer- & ...

amazon web services - Recipe to run on deployment and standalone -

I have a recipe ( migrate.rb ) that ran as part of our deployment Goes and works perfectly. However one thing that I can not work out, how to set it up so that it can be run as a standalone recipe in the execute_recipe command. As it stands, if we execute this recipe as a stand alone then nothing happens after the node [: deployment]. There is nothing near the loop on (deployment keys do not exist). This only part based on the deployment node is the line cwd "# {deploy_to}} / current" because I need to know where the code was deployed is. node [: deployed] .each do | Application, Posted in | Execute 'DB Migrate if Seed' CWD # # [Deployment [: Deployment]] / Current "Command" PHP Worker Migration; While Reading-R Line || [-n "$ line"]; Do php Artisan DB: Seed - class = "$ line"; didn & lt; "ap / database / run.lit" 'end end I will move that part to a definition (or a provider) so basically divide...

c# - MouseWheel event issues on Controls -

I need to get mousewheel events on picturebox control and according to another answer, Should: zero pic_MouseWheel (object sender, MouseEventArgs e) {if (e.Delta! = 0) {MessageBox.Show (e.Delta.ToString ()); }} But this does not work Now the message box is displayed and no breakpoint is being hit. How can I capture a mousewatch event on a picture box and can also determine how the user scrolls down the UP or down wheel? No problem, I thought it. I need to first focus the image box: zero pic_Click (object sender, EventArgs e) {(PictureBox Sender) Focus (); }

entity framework 4 - Can I change the the Datatype of Column Body of table BlogPost in Nopcommerce Database? -

I want to post my blog to my store which belongs to NOPComers and my blog content size is more than 4000 characters is. Now I want to change that limit but it does not allow me to change the datatype or the size of existing datatype which is a string. I have tried to replace it with a blog postmap file, but it does not work for me. Can someone suggest me to solve this problem? Thank you in anticipation. There is no limit to posting blog sizes, nor in the database nor in the code. The database definition for body is NVARCHAR (MAX) and you do not need to modify the blog postmap file. The problem is elsewhere Are you using the custom process to create a nopCommerce interface or blog? Is there a problem with the management studio? Check it out:

javascript - Find Id of clicked button -

I wanted to get the ID of the clicked button because I have 4-5 buttons on my form. & lt; Button type = "submit" style = "height: 30px" id = "btn help" name = "btn support" onclick = "ShowHelp (2); return back;" & Gt; Help & lt; / Button & gt; & Lt; Button type = "button" style = "height: 30px" id = "btnclose" name = "btnclose" onclick = "close (); return back;" & Gt; Close & lt; / Button & gt; & Lt; Button type = "button" style = "height: 30px" id = "btn save" name = "btn save" onclick = "save (); return back;" & Gt; Close & lt; / Button & gt; ............................... Any button can be clicked, I just want to get that button's ID. $ (function () {var id = $ (this) .attr ('id'); Alert (id);}) with it Also $ ("Input"). Click (function (event) {va...

java - How to verify Email on Server without sending an email? -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब मैं ईमेल पता सत्यापित करना चाहता हूं एक ईमेल भेजने के बिना, क्योंकि जब हम जानते हैं कि यह अमान्य ईमेल है, तो मैं क्यों ईमेल भेजता हूं आप एक इस तरह से पैटर्न: निजी स्थिर अंतिम पैटर्न मेल Pattern = Pattern.compile ("^ [a-z0-9! # $% & amp; '* + / =? ^ _` {|} ~ -]: | - * @ ((\\ [एक-Z0-9 # $% & amp '* + / = ^ _ `{} ~]?।!?): [एक-Z0-9 ] ([एक-Z0-9 -] * [एक-Z0-9]?) \\) + [एक-Z0-9] (:।? [एक-Z0-9 -] * [एक-z0 -9]) "$"); अगर (! MailPattern.matcher (ईमेल) .matches ()) {// TODO मेल पता अमान्य है। } यद्यपि यह केवल ईमेल प्रारूप के लिए जांच करता है, सर्वर को पिंग करने या पूर्ण सत्यापन संभालने के लिए कोई अन्य जटिल कदम नहीं करता है।

c# - How to custom serialize a property? -

मैं अपने कक्षा में एक json serializing कर रहा हूँ: [Serializable] सार्वजनिक वर्ग फ़ीड {सार्वजनिक स्ट्रिंग आईडी {get; सेट; } सार्वजनिक स्ट्रिंग id_str {get; सेट; } सार्वजनिक उपयोगकर्ता उपयोगकर्ता {get; सेट; } सार्वजनिक दिनांक समय बनाया_अट {प्राप्त; सेट; }} JavaScriptSerializer jss = नया JavaScriptSerializer (); फीड फ़ीड = jss.Deserialize & lt; फीड & gt; (जेएसएन); created_at नामक एक फ़ील्ड है, लेकिन मैं इसे सीधे json से नहीं जमा करना चाहता हूँ, लेकिन पहले इसे संसाधित कर रहा है, जैसे: दिनांकटाइम। पैराएक्सएक्ट (बनाया गया, "डीएमडीएमएम डीडी एचएच: एमएम: एसएस ज़्ज़्ज़ य्याय", कल्चर इन्फो। इन्विरियनटीकचर); मैं इसे कैसे कर सकता हूं? आप का उपयोग करने के अलावा इस तरह से एक चाल का उपयोग कर सकते हैं: [सीरियलज़ेबल] सार्वजनिक वर्ग फ़ीड {सार्वजनिक स्ट्रिंग आईडी {get; सेट; } सार्वजनिक स्ट्रिंग id_str {get; सेट; } सार्वजनिक उपयोगकर्ता उपयोगकर्ता {get; सेट; } सार्वजनिक स्ट्रिंग created_at {get {return createdAt.ToString (FORMAT); } सेट {निर्मित} दिनांक = समय। पर...

c++ - maximum 2 digits from a number -

In order to find the maximum number of values ​​from user input number, my code is in 'Attempt': #include & lt; Iostream & gt; using namespace std; Zero Max 2 (int a, int and max 1, int and max 2) {int temp = 0; Max 2 = a% 10; Max 1 = ((A / 10)% 10); If (max2> max 1) {temp = max1; Max1 = max2; For Max2 = Temporary;} (; a & gt; 0; a / = 10) {if (a% 10> max1) max1 = a% 10; And if (a% 10 & lt; max1 & amp; one% 10> Max 2) max2 = a% 10; }} Zero main () {int max1, max2, num; CIN & gt; & Gt; Number; Maximum2 (number, max1, max2); Cout & lt; & Lt; "Max 1 =" & lt; & Lt; Max1 & lt; & Lt; "Max2 =" & lt; & Lt; Max2 & lt; & Lt; Andal & lt; & Lt; Andal; } It works perfectly for most numbers, e.g. Like 34256, except for some cases, for example, when I input 54321, the maximum is 5, which is correct, but it allows maximum 2 to 1, which is not the desired value. Will you be very kin...

sql server - Which performance is best (Table type or XML) to Pass as Parameter in to SQL function -

I have to give data in a SQL function that is on the other DB. The data is more than 10000 at a time. So what is the best practice / performance to pass data in the SQL function? BY XML From the tablet type. Please advise me because it is necessary. I need the best performance, if possible, give me benchmarks or even examples. Thanks in advance. Table-valued criteria are usually fast, mainly because there is no need to open them on the server side. it occurs. Make sure you take the time to pack data-client-side. Here is an article to compare the various methods of sending data to the SEL server:

What is the difference between the android:versionCode and android:versionName attributes in the AndroidManifest.xml file? -

इस सवाल का पहले से ही एक उत्तर है: 7 उत्तर के बीच अंतर क्या है Android: versionCode और एंड्रॉइड: AndroidManifest.xml फ़ाइल में संस्करणनाम विशेषताएं? डॉक्टर के रूप में: एंड्रॉइड: versionCode एक ???? एक पूर्णांक मान जो अन्य संस्करणों के सापेक्ष, अनुप्रयोग कोड के संस्करण का प्रतिनिधित्व करता है मान एक पूर्णांक है, ताकि अन्य अनुप्रयोग प्रोग्रामेटिक रूप से इसका मूल्यांकन कर सकें, उदाहरण के लिए अपग्रेड या डाउनग्रेड रिश्ते की जांच कर सकते हैं। आप इच्छित मान को किसी भी पूर्णांक में सेट कर सकते हैं, हालांकि आपको यह सुनिश्चित करना चाहिए कि आपके एप्लिकेशन का प्रत्येक रिलीज एक बड़ा मूल्य का उपयोग करता है। प्रणाली इस व्यवहार को लागू नहीं करती है, लेकिन लगातार रिलीज़ के साथ मूल्य में वृद्धि करना मानक है। आमतौर पर, आप संस्करण कोड के साथ 1 के लिए अपने आवेदन का पहला संस्करण रिलीज़ कर देंगे, फिर प्रत्येक रिलीज के साथ मूल्य में वृद्धि की जाएगी, भले ही रिलीज़ एक बड़ा या मामूली रिहाई का गठन हो। इसका अर्थ यह है कि एंड्रॉइड: वर्जन कोड का मान उपयोगकर्ता के लिए दृश्यमान संस्करण के लिए एक ...

javascript - jQuery load() prevent link twice if parent page already have -

मेरे पास एक पृष्ठ है jquery लोड (पृष्ठ डेटा लाइटबॉक्स में लोड होगा) / /index.php & lt; script type = "text / javascript" src = "/ jquery-1.11.0.min.js" & gt; & lt; / स्क्रिप्ट & gt; & lt; a href = 'login.php' & gt; & lt; / a & gt; // lightbox इस पृष्ठ को index.php में लोड करेगा // लॉगइन.एफ़पीपी jquery पोस्ट डेटा का उपयोग क्योंकि iPhone पर लेआउट समस्या है, मैं window.location सीधे login.php पृष्ठ पर। मेरी समस्या login.php पेज में है jquery लिंक नहीं है अगर मैं अपने login.php में इस लिंक जोड़ते हैं, जब डेस्कटॉप डिवाइस का उपयोग हल्की बॉक्स को लोड करता है, यह दो बार jquery लोड करेगा क्या माता-पिता के पेज में पहले से कोई लिंक नहीं है, फिर से लिंक नहीं होता है, पीएचपी की तरह कुछ ऐसा होता है? ऐसा करने का एक बहुत ही ईज़ तरीका अपनी खिड़की में। स्थान + '? मोबाइल = 1' आपके login.php से अधिक यू $ _GET isset जांच कर सकता है, अगर लिंक गूंज से

ruby on rails - How can I fully change "Password doesn't match confirmation" error message activerecord -

इस सवाल का पहले से ही एक उत्तर है: 6 जवाब yml पूर्व> एन सक्रियरेकॉर्ड: त्रुटियां: मॉडल: उपयोगकर्ता: पुष्टिकरण: "पासवर्ड मेल नहीं खाते" लेकिन मुझे "पासवर्ड पासवर्ड करते हैं मैच नहीं " मैं कैसे" पासवर्ड "से छुटकारा पा सकता हूं? इसे आज़माएं: # config / locales / en.yml en: activerecord: विशेषताएँ: उपयोगकर्ता: password_confirmation: "पासवर्ड" त्रुटियां: मॉडल: उपयोगकर्ता: विशेषताएं: पासवर्ड_confirmation: पुष्टिकरण: "मेल नहीं खाते!"

python - Regex: Ignore matches starting with a specific char -

मेरे पास निम्न RegEx है: (। +?) \ 1+ इसका उपयोग स्ट्रिंग में दोहराया अनुक्रमों को पहचानने के लिए किया जाता है। लेकिन मैचों में केवल अंकों या अंक शामिल नहीं हो सकते हैं और ये भी अंक के साथ किसी बिंदु या अंत से शुरू नहीं हो सकते हैं। मैंने कोशिश की: ^ [^।] (। +?) \ 1 + $ [\ d] लेकिन यह समाधान काम नहीं कर रहा है । उदाहरण के लिए यह 4F.4F.4F संपादित नहीं कर रहा है: मैंने सभी को जोड़कर समाधान पाया उत्तर के विचार यह है: (?!?) (। +?) \ 1 + (? & Lt; = \ D) आपको $ : से पहले \ D (नॉन-डिजिट) डालनी होगी ^ [^।] (। +?) \ 1+ \ D $

javascript - JQuery table filter with text box -

With a text search, the table needs to be filtered out of the table For example, if I have any input element I write the word, so I want to get all the rows in the table that are the content of that word. Place this code in the "head" section of your page: & lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.11 .0 / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("# searchInput") Keyup (function () {var val = $ (this) .val (); $ ("# searchTable tr td"). (I) {var content = $ (this) .text (); if (content.toLowerCase) IndexOf (val) == -1) {$ (this) .Parent (.) Hide ();} else { $ (This). Parent (). Show ();}});});}); & Lt; / Script & gt; And suppose your HTML looks: & lt; Div & gt; & Lt; input type = "text" id = "searchInput" /> & Lt; Table id = "searchTable" & gt; & Lt; TR & gt; & L...

C Does strcpy needs specific buffer size or will still work? -

I have decompiled an application and I do not know the size of the real array so I have made it very big, but I wonder. What do I need to do is use strcpy or should I consider the size of strcpy ? signed int __cdecl SendSomePacket (structure connection * conn, int a1, int a2, const char * a3) {// char buf [256]; // [SP + 10H] [BP-9H] @ one four buff [10]; // [SP + 10H] [BP-9H] @ 1 * (unsigned full *) and Buff [1] = A1; * (Unsigned integer *) and buff [5] = A2; Strapepie (and Buff [9], A3); Buf [0] = 0xEu; // Packet Type Returns SendPacket (CONNECTION-> Socket, Buff, Stellen (A3) + 10, 1); } I should ask that it should be left with 256 which estimates the default size by which always 2 is like 256,512,1024,2048 .. four buff [256]; // [SP + 10H] [BP-9H] @ 1 Or I should reduce as much as possible to save the memory. char bf [10]; // [SP + 9H] [BP-9H] @ 1 to which buffer I have applied after the string (A3) Should be bigger. I tried just strakpy with the buffer ...

php - jQuery .ajax function, exactly how to use it -

I am using WordPress and need to update the data of tables with jQuery AJAX, I have the following The code that successfully posts the data GE ('click', function () {var myname = jQuery ('# update- & lt ;; php echo $ row-> ID;; & gt;') Input [name = "name_two"] '). Val (); var mystep = jQuery ('# step & lt ;? php echo $ row-> ID;; & gt; option: selected'). Val (); jQuery.ajax ({Type: "POST", url: "/wp-content/plugins/gates/updateGateData.php", data: {name_two: myname, step_two: mystep}, success: function (data) {warning (' Data update ');},}};}); Now my problem is what to put in the UpdateGateOption.php file to post to the database update. Thanks for the responses! So I have it now: $ name = $ _POST ['name_two']; $ Step = $ _POST ['step_two']; Global $ wpdb; $ Wpdb- & gt; Update ('gate_top'), array ('step' => gt; $ step, 'name' = & gt; $...

vb.net - Why are all of my Random variables the same (Visual Basic)? -

This code is trying to use multiple random variables for what I am creating in Visual Studio. The Private sub button handles 1_Click (as the sender object, and EventArgs) button 1. Click 'New Random Dim CC 5 as new random slow CC 3 as new random slow cc2 as new random slow cc1 new random blur cc1 new random silk cc1 as new random cc1 = Cc1.ext (1, 14) Dimensional cCard2 as new integer cCard2 = CC2. New integer cCard4 = cC4 as the new integer cCard3 = cC3.ext (1, 14) dim cCard4 as the next (1, 14) dim cCard3. New integer dimension in the form of a new integer cCard5 = cc5.ext (1, 14) 'computer random option dim x as the next (1, 14) dim cCard5 new Random x = S.Next (1, 14) is slightly more but it is basically a duplicate. The problem is that these "random" variables are all the same, I thought the error might have been because the code was: dim cCard1 = cc1. Next (1, 14) I have written another program which I wanted with the exact same code, while the pro...

android - DialogFragment with WebView - Handling back button? -

It should be that simple, but I can not find a working solution ... I have a DialogFragment that has a linear layout that includes a WebView. When the user navigates into the webview, I want to be able to go back using the back button. When he / she reaches the start page (i.e. can not go back), the back button dialog should be closed. I tried setCancelable (wrong) and DialogFragments was reversed with an OnKeyListener on the root view (one that was incremented), but it never seems to call back the button. I do not want to include onBackPressed of the activity (it should be controlled by DialogFragment if possible). So far the solution I found is to install WebView's OnKeyListener like this: @Override Public View onCreateView (LayoutInflater Inflator, ViewGroup Container, Bundle savedInstanceState) {View V = inflater.inflate (R.layout.dialog_fragment_layout, Container, Incorrect) WebView = (WebView) V. FindViewById (R.id.webView) ); WebView.setOnKeyListener; return v;...

android - onReciever() method of Broadcastreciever is not called when i run the app Log.d() not show on log cat -

- I'm a new Android developer and BroadcastSear's Reciever () method is not called when I run Ap log D I am ) Not to show on log -inist file & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Receiver Android: name = ". MyReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.net.conn.CONNECTIVITY_CHANGE" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Activity Android: name = "com.Audio.audioplayer.PlayerAudioActivity" android: label = "@ string / app_name" Android: Screen Orientation = "Portrait" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = ...

asp.net web api - REST API design with async (polling) operations and errors that are found "later" -

इस संसाधन का प्रतिनिधित्व: अनुरोध / आईडी / संसाधन जो async संसाधन निर्माण का समर्थन करने के लिए किया जाता है (आप पहले एक अनुरोध सबमिट करते हैं, तब तक संसाधन के लिए मतदान करने के लिए id का उपयोग करें जब तक आप 200 ठीक नहीं मिलते), मूल अनुरोध की त्रुटियों को वापस करने के लिए एक अच्छा स्थिति कोड क्या होगा मतदान चरण के दौरान क्या पता लगाया? लंबे विवरण: इसलिए मुख्य समस्या यह है कि मूल अनुरोध को सबमिट करने से कुछ अमान्य मापदंड हो सकते हैं, और लौट रहे लोगों के लिए 400 बुरा अनुरोध ठीक है। समस्या यह है कि इनमें से कुछ पैरामीटर केवल बाद में वैध हो सकते हैं, जबकि मतदान चरण (जबकि वास्तविक संसाधन बनाया जा रहा है) के दौरान, इसलिए हमें इस जानकारी को उपयोगकर्ता को प्रसारित करने की आवश्यकता है। हम इस प्रक्रिया के दौरान वर्तमान में त्रुटियों के लिए क्या लौटते हैं 500 आंतरिकसर्वर त्रुटि है, लेकिन अगर हमें लगता है कि कुछ प्रारंभिक अनुरोध में गलत था तो यह शायद ही एक आंतरिक सर्वर त्रुटि है 400 बुरा अनुरोध वापस करना मन में आता है, लेकिन वास्तविकता में मतदान मत से ही कुछ भी गलत नहीं है (मेरे लि...

c# - Windows Phone Dev: Play internal mp3 files with winmm.dll -

I need a help in displaying MP3 player files. I search the internet and I think If I need to take an MP3 file from an external directory then just use winmm.dll. I need to modify it for the internal directory of my app. We show the code: I create MP3 player in this way: Class MP3 Player: IDisposable [ DllImport ("winmm.dll")] Private static extern lengthy MCAsted string (string lpstr comand, stingbuilder LPstrReturnString, intraTransport lang, int HWDD callback); Public Zero open (string file) {const string FORMAT = @ "Open" "{0}" "Type mpeg video nickname memabs"; String command = string.format (format, file); MciSendString (command, blank, 0, 0); } Public Zero Play () {string command = "play mymp3"; MciSendString (command, blank, 0, 0); } Public Zero Stop () {string command = "Stop MyMp3"; MciSendString (command, blank, 0, 0); } Public Zero () {string command = "Turn off MyMp3"; MciSendString (command, b...

javascript - looping through a variable length with Angularjs templates? -

The car.images_length variable has a number, for example "4" . Therefore, depending on the peak, 4 & lt; Li & gt; I want to intersect and create elements I know that car.images_length is the value because I have logged in using Javascript. This is a very newbie question, but I'm new to Angulus. Im trying to try, but I have no luck, this is my code: HTML & lt; Ul rn-carousel-Corcelle-buffer class = "image" ng-ripat = "image in car.images_leng" & gt; & Lt; Li & gt; & Lt; IMG src = "picture / car / {{index}} .jpg" & gt; & Lt; / Li & gt; & Lt; / Ul & gt; You want to intersect at li elements, Code> UL and lt; ul rn-carousel rn-carousel-buffered class = "image" & gt; & Lt; li ng- repeat = "number in range (0, car. dimension_length)" & gt; & Lt; Img src = "picture / car / {{number}} .jpg" & gt; & Lt; / Li & gt;...

Unix shell scripting with counter -

I'm new to Unix shell scripting I need to write a shell script which is a The variable should increase the value (numeric) and when I run the script the next time the variable should be assumed and it should be incremented. Once it helps, it will be very grateful thanks Try the following code: vale = 'expr 0000000000 + 1' Ed -s $ 0 & lt; & Lt; EOT1S / .......... / `printf '% 010d' $ vale` / wq EOT $ vale $ vale

Contact form e-mail integration Javascript HTML -

Hi, I would like to ask some help about my contact form because I do not know where I will include code in e- Mail is about to receive information in the contact form. Thanks in advance & lt; Center & gt; & Lt; Form name = 'Contact form' & gt; & Lt; Div & gt; Name: & lt; / Div & gt; & Lt; Input class = 'contact form-name' id = 'ContactForm1_contact-form-name' name = 'name' size = '30 'type =' text 'value =' '/ / gt; & Lt; Div & gt; Email: & lt; / Div & gt; & Lt; Input class = 'contact-form-e-mail' id = 'ContactForm1_contact-form-email' name = 'email' ize = '30 'type =' text 'value =' '/ / gt; The best way is to create a PHP script which is run on submitting the form! & lt; Form name = 'contact-form' id = "form" method = "POST" verb = "enter PHP URL here" & gt; ...

Laravel 4 - Database design -

मेरे पास निम्न आवश्यकताएं हैं: एक उपयोगकर्ता संग्रह में प्रकार (शायद मॉडल) संग्रह में एक पुस्तक जोड़ें उल> इस प्रकार, मेरे पास अभी तक के मॉडल हैं: उपयोगकर्ता और पुस्तक मैं बहुत से रिश्तों का उपयोग करना चाहता हूं आसान तरीका, उदा। $ इच्छा सूची = $ उपयोगकर्ता- & gt; संग्रह () - & gt; इच्छा सूची; $ वॉचलिस्ट = $ उपयोगकर्ता- & gt; संग्रह () - & gt; वॉचलिस्ट; ये दो चर तब तक पुस्तकों का संग्रह होनी चाहिए। मैं भी विभिन्न संग्रहों को उस तरह से एक्सेस करना चाहूंगा, जिस तरह से मैं कैसे गिन सकता हूँ कई बार एक निश्चित पुस्तक किसी भी उपयोगकर्ता की इच्छा सूची का हिस्सा है। उदा। $ book = book :: find (1); $ Wishlist_count = $ book- & gt; संग्रह () - & gt; इच्छासूची- & gt; गिनती (); मैं इन रिश्तों के मॉडलिंग के बारे में कैसे जा सकता हूं? प्रत्येक प्रकार के लिए सेटअप पिवट तालिका: // आप रिश्तों को बहुत आसानी से कॉल कर सकते हैं: $ user- & gt; booksWishlist; // पुस्तक मॉडल का संग्रह $ book- & gt; प्र...

c# - Does no work correctly: Application.StartupPath -

I have created a C # program with Visual Studio 2012. The penis installer with the installer, and it has been found that when the path is for the database, the program always generates the path ... even though my computer runs it on other computers I do not understand why this is happening, because I use the function: application.startuppath It is believed that the program Take the path of each user running. Why is not it working properly? This may be a right issue if the program is run in limited rights, "it seems that Due to the copy of the shadow, the path may be different, such as "sandbox" by UAC. " You can try to use the following: System. Reflection. Aspector.Get AccedingAssemband () Location But Is it wise to save DB in the application folder? If the user is not an administrator then he can not write & gt; % APPDATA% should be used, e.g.

php - Replace string with a particular format -

मेरे पास निम्न प्रारूप के साथ एक स्ट्रिंग है, some_string% value1: value2: value3 :% Some_anather_string% value4: मान 5: मान 6:% मुझे % value1: value2: value3:% और % value4: value5 को निकालना होगा: मान से 6:% स्ट्रिंग से, मेरा मतलब है कि मुझे % के साथ आरंभ करने के प्रारूप के साथ :% और किसी भी स्ट्रिंग को : क्या यह संभव है? मैं str_replace () के साथ कोशिश करता हूं, लेकिन यह केवल हम ही मूल्यों को जानते हैं। "post-text" itemprop = "text"> इस सरल regex का उपयोग करें $ echo $ preg_replace ("~ % (। *?):% ~ "," ", $ Str);

xcode - Weird behaviour of C strcpy -

I wrote a small program in C. It's fully compiled and works, when I make it my Makefile and swing , however, this function does not like it in Xcode (or it behaves like this As it should and the chapra is ignoring it). size_t getUrlForArgandPlatform char ** dest, const char * arg, const char * platform) {int isLinux = strcmp (forums, "Linux"); Int isOSX = strcmp (forums, "Darwin"); Char * platformUrlDelimiter = malloc (6 + 1); If (isLinux == 0) {strcpy (platformUrlDelimiter, "linux"); } And if (isOSX == 0) {strcpy (platformUrlDelimiter, "osx"); } Other {strcpy (platformUrlDelimiter, "normal"); } Int length = (int) strlen (kBaseUrl); Length + = strollon (platformUrlDelimiter); Length + = stellen (arg); Length + = 5; Four * buffer = (four *) maulok (length); If (buffer == faucet) {exit (EXIT_FAILURE); } Strcpy (buffer, cabage url); Dome (buffer, "/"); Vertical (buffer, platform url, delimiter); Dome (buffer, "...

Perform multiple left joins using Linq -

I have four tables I want to work in the following ways to connect more than one left in the table. in Table 1 in Table 2 in Table 2 & lt; Condition1 & gt; To join Join1 1 from subJoin1 Default IFEmpty () in Table 3 & lt; Condition2 & gt; From joining in join2 to subjoin2 Default IFEmpty () in Table 4 & lt; Condition3 & gt; Join 3 in 3 from subjoin3 Default IfEmpty () New {Field1 = t1.some_field, Field2 = t2.some_field, Field3 = t3.some_field, Field4 = t4.some_field,} My problem is that before leaving The loneliness works well, but when the left joining is done continuously, the T1 data line is lost if mapping is not found in T3, T4 etc. Please help. You do not need in (at least yet)! Something like this From t1 in Table 1 to 2 in Table 2 & lt; Inner_join_condition & gt; T3 in Table 3. Where (& lt; left_outer_join_condition & gt;) DefaultIfEmpty () ... Select New {Field1 = t1.some_field, Field2 = t3.some_field, ...} Gen...

Generating QR code for Android with High error correction -

I am currently building a QR code in my Android app but the customer complained that we have to make it with the code Is required. The code I am currently using is low, but the problem is that I do not know how exactly a QR image is generated with some error connection: Private bitmap encodedAbitmap (string content, barcode format format, IITIV_With, IMG_HEight) author exception {string contentToEncode = content; If (content ooocode == empty) {return tap; } Map & lt; Encodedtype, object & gt; Signal = null; String Encoding = EstimateProperty Encoding (ThemeNIN code); If (encoding! = Null) {signal = new anomap Thanks a long way for help! Use the Google chart API if you need online QRcode generator. https://chart.googleapis.com//chart?chs= "+ width +" X "+ width +" & amp; cht = qr &; chl = yourqrcodetext "

adobe - How do I manipulate the component groups allowed in sidekick according to different websites in my CQ5 instance? -

I tried the above but due to the incompleteness of the article, I failed. What really happens when the page loads? Which JS calls? How can I override the 'Update' function of ComponentList.js? How do I call it? I tried to use the listeners and failed (due to the bad first time with the listener?) Each client side component also becomes a cell search path and finally a CQ.wcm.Cell & gt; Assigned The array of allowed components is stored in a CQ.VCM. Component list is an example page per class. Insert dialog and sidekick get the last list of components from that object. The "updatecomponentlist" listener can be registered using normal editing. On the CONFECTION listeners container component, read components list from design path according to document sidekick and To modify it, to add the updatecomponentlist event listener to a container component in the editing config, you have to add the client side to you. I can not tell you the interior,...

image - img-square the same way img-cirlce works in bootstrap -

Hi, I am creating a portfolio in Bootstrap with a thin thumbnail category and instead of creating each thumbnail image in Square, Photoshop Id just likes to use a class like image-circle to create the thumbnail class before clicking the viewer to show the image. This is possible with the CSS no plugin Bootstrap circle caches which All adds an element to the radius, it does not crop or does not centrifuge the image of more than one size. This is probably the easiest way of crop and center in a square container, though I argue that you should use background image for it: & lt; Div class = "thumbnail" & gt; & Lt; img src = "http: //your/large/image/source.jpg" & gt; & Lt; / Div & gt; . Thumbnail {width: 200px; Height: 200 pixels; Hidden flurry; Status: Relative; } IMG {status: complete; Top: -9999 pixels; Bottom: -9999 pixels; Left: -9999px; Correct: -9999px; Margins: Auto; }