Tuesday 15 April 2014

objective c - Adding An AlertView At viewWillAppear, iPhone -


I see as soon as a view appears (without using a single button) I try to show an alert view I am doing Viewcontroller.m I have:

  - (zero) viewWillAppear: (bool) animated {UIAlertView * warning = [[UIAlertView alloc] initWithTitle: @ "User Info" Message: @ "hello "Representative: Self cancelTutNitile: any other button titles: @" continue ", zero]; [Alerts show]; [Warning issued]; }  

and I have in viewcontroller.h:

  IBOutlet UIView * warning;  

I have not done anything to my .xib file

When running simulators I get the following in the console:.

2009-11-11 23: 41: 36.079 BatteryApp [867: 20b] *** Expected exception 'NSInternalInconsistencyException', due to reason the app ended: '- [UIViewController _loadViewFromNibNamed: bundle:] "BatteryAppViewController" was full of nibbles but had a visual outlet

Any idea where I went wrong to take something from my xib, wrong?

Edit // I have not set any new sequence alert to connect in my xib, even then fails. Text after "

The problem is that two major animations (for viewing current view, and a warning for Is going to be overlap

  1. The warning code is in viewDidAppear viewWillAppear

  2. Call [Alert Display Selector: @selector (Show off) withObject: after zero: 1) . This ensures that the warning is generated after the current animation is over.

You may still have to be careful about issuing a warning if I were you, then I would like a different method (for example And then call it to see DAADPER:

  - (zero) viewDeadapp: Object with BOOL animated {[Self Display Secretary: @Selector (SHAHELO): after zero : 0.0 F]; [Super viewedapper: animated]; }  

python - Set and use flags against a users profile model in Django -


I have a simple webpage in Django for an iPhone app. I want the user to review our product, but just one time. I do not want to show that sign again again.

To do this, the best practice to implement this will be to add a new entry in the user profile model with the bidding field: "Reviewed" - and then the user completes the action Set that flag?

Then I will check to appear in that template or not, prompt.

I have not worked yet database model, user model extended or saved in custom DB field, so any thoughts or examples will be welcomed on this. I'm a bit upset because my site is a live user and I do not want to break user tables.

If you are using MySQL or PostgreSQL, then you see some optional table without losing any data.

In Django, it is quite easy to add a profile for the user. Make sure the profile does not exist:

  Try: Profile = request.user.get_profile () Excluding UserProfile.DoesNotExist: # if DoesNotExists, create an empty profile = UserProfile (user = Request.user) profile.save ()  

More info here:


c# - Quick and dirty reflection based XML Serializer -


Is anyone aware of the quick and dirty implementation of a reflection-based XML serializer?

I want to extract my XML serialization code due to the fierce initial time. I know about sgen.exe but my build and packaging process does not want to complicate.

We use XML serialization at startup to remove configuration values ​​from a file, there will be less reduction in reflection, we call 20-40 values ​​as max. We do not need super fast here, I just think 500-700 mms in my case do not want to hit the hit to compile the XML serializer.

I also have to control the code, because I would like very strong error handling

I know that ProtoBuff.Net, but it can be a little overkill. Looking at the data contracts, they can be limited to a child and a lot of decoration is required, which I would like to save.

If this is only 20 to 40 values, why not remove all serialization malacres and hand codes ? You should be able to code a readings class in a flat without being able to code it, you can prepare the code and go home early, in this way it can be as strong and error as you wish. , And it will load faster than 700ms.


c# - Pulling Images from RSS Feed -


I am developing a background wallpaper converter for Windows I am thinking of drawing pictures from RSS feeds. As a way to display feed changes in the feed, I am currently dragging the page as text and searching for text like "

Well, I would have thought you would need to do this to get a partial image URL, and then Attach the baes URL to the original server (unless the URL in the RSS feed is the full URL of the image).

Then, you can download it somehow: but instead of using Response.OutputStream, use the stream to save the file to the server.

And it will write image files on your machine ...

H.H.


.net - How to serialize a derived class as its base class -


I have a derived class that only connects to the base class methods that can serialize the derived class so that it can be classified as base class Matches the serialization. That is, the ordering XML of a derived class should look like this:

  & lt; Base Class & gt; ... & lt; / Base Class & gt; For example, an invalid operation exception will be thrown in the following. "Type DerivedClass was not expected. To specify the type of XmlInclude or Use the SoapInclude attribute, which are definitely not known. " Class BaseClass {} Category DerivedClass: BaseClass {} DerivedClass derived = new DerivedClass (); Streamer stream = new streamer ("output file path"); XmlSerializer serializer = New XmlSerializer (GetType (BaseClass)); Serial (stream, derivative);  

You have to pass GetType (DerivedClass) to the Serializer constructor, it is necessary by you Match the sorted object type You can change the code in the & lt; XmlRoot & gt; You can use the attribute. This example code works as a purpose:

  using the system; Using System.Xml.Serialization; Using System.IO; Class program {static zero main (string [] args) {var obj = new DerivedClass (); Obj.Prop = 42; Var xs = New XmlSerializer (type (DerivedClass)); Var sw = new stringwriter (); Xs.Serialize (SW, obj); Console.WriteLine (sw.ToString ()); Var sr = new stringreader (sw.ToString ()); Var obj2 = (Base Class) xs.Deserialize (sr); Console.ReadLine (); }} Public Class Base Class {Public Ent Prote {get; Set; }} [XmlRoot ("BaseClass")] Public Category DerivedClass: BaseClass {}  

linux - Bash: How do I truncate an array? -


I want to change the value of an array and appreciate any help.

I found that this is an array:

  user = (root isometric okay)  

(this is actually the current user's List) that I want to be able to check that the user is present and if they do not, then to remove the person from the array I tried to evaluate it by putting it in the loop for use:

  $ i user [@]}; "User = (echo (" $ [$ [[[-z $ (grep \ "^ \ $ i \" / etc / shadow)] and \ "s \" / \ $ i // g \ "))" $ Users  

I thought about playing it with something else but I thought I was getting very complicated (I'm not sure I can place an order in an array ) Anyone have an idea on how to do this?

Edit:

How do I enter the variable variable number:

  cnt = 0 for $ i {the user [@]}; Do [-s "$ (grep" ^ $ i "/ etc / shadow)"] & amp; Amp; Users Unset [CNT] ||             

Actually Dennis is also better.

You do not need for the loop. Try it:

  users = (root isometric açau) list = "$ {users [@] /% / |}" # Convert the array to the list, after every user pipe care Add # Find the username between the empty space and the offer from the strip list # Line at the end of the word and the result, create an array out of the results users = ($ (grep -Eo "^ ($ {list //}) \ & gt; / Etc / shadow))  

grep , unraveled, will look like this:

  grep -Eo "^ (root | Isometric | akau |) & gt; "/ etc / shadow  

objective c - iPhone language setting -


I'm junior in iPhone game development. I am using cocosdaddy for this game which I am currently producing. I have completed this game, though my client wants 1 more version of this game, all the functionality except the language are the same, he wants that the game will be changed to the French version if the language of the iPhone is set to French I just need to change the button, the text inside the game with the French. But I'm not quite sure about the language setting in the iPhone, how can I change the whole thing according to language settings in different versions, nobody knows where I can start? Please give me a hand, I really appreciate any help.

Thank you very much


Here's my code. Should you do this how to localize these codes

  [MenuItemFont setFontSize: 16]; [Menu item font set fontname: @ "hellevica"]; MenuItem * backToMenu = [MenuItemImage itemFromNormalImage: @ "back_to_mainmenu.png" selected image: @ "back_to_mainmenu_PUSH.png" Goal: Self Selector: @Sillector (BackToMmenensen :)]; MenuItem * playAgain = [MenuItemImage itemFromNormalImage: @ "Eplay_again.png" Selected Image: @ "Eplay_again_PUSH.png" Goal: Self Selector: @Selector (playAgainGame :)]; MenuItem * uploadOnFaceBook = [MenuItemImage itemFromNormalImage: @ "Eupload_on_facebook.png" Selected Image: @ "Eupload_on_facebook_PUSH.png" Goal: Self Selector: @Selector (UploadOffsBookFunction :)]; Menu * menu = [menu menus along with: backmen menu, playgain, uploadonebook, zero]; Menu.position = CGPointZero; BackToMenu.position = CCP (400,40); PlayAgain.position = CCP (24040); UploadOnFaceBook.position = CCP (8040); [Add Yourself: Menu Z: 1];  

You will need to make your app localized with the localizable.string file where you have all your strings Enter the properties for each language and see:


datetime - Natural/Relative days in Python -


I have a way to show natural time for dated objects in Python. Such as "one moment ago", "a few minutes ago", "two hours ago", "three days ago", etc. Etc.

The method "humanize" Django.contrib in Django 1.0 I am not using the Django framework, and even if I am also, it is more limited than I like.

Please let me know (and generations of explorers of the future) whether someone is doing a good job beforehand. Since this is a normal job, I think there must be something.

This is not useful for you at this moment, it can also be done for future explorers: Babel The module, which is related to all types of locale material, has more or less a function that you want to do. Currently it is only in its trunk and not in the latest public release (version 0.9.4) Once the release has the functionality ground, you can do something like: datetime import from babel.dates imported timedelta from import format_timedelta delta = timedelta (day = 6) format_timedelta (delta, locale = 'en_US') U'1 week '

It is taken directly from it. This gives you fewer paths than it does not bend at the "moments ago" level, but it must be done "n minutes" etc. Correctly plural

What is the value for this, the Babel module includes tasks for date formatting and the locale according to time, which can be useful when the time delta is large.


.net - Centre the background of a TabControl in WPF -


I am trying to get an image to float unstackle in the middle of my tab control. I started down with JMAML which extends the image

   

I have tried to use VisualBrush with a grid inside it, but I can not get the desired result.

  and lieutenant; ImageBrush ImagesSource = "/ LogoTest; Component / Logo_Final" Alignment = "Center" Alignment Y = "Center" Stretch = "None" />  

language design - Pros and cons of Go rejecting unused dependencies -


Google's new language tries to simplify dependency management. The compiler will reject a module that announces dependency on a module without using any of that module.

This package is illegal for importing or importing packages for themselves, the exporter's identifier.

I can think of some obvious benefits (such as a cleaner module), but maybe there is some non-obvious only one loss which I can think is an excessive PDC compiler, There is a lot of complaints during refactoring, but maybe more?

Do you have any experience with other languages? What are the pros and cons of this approach?

Not only do you need to explicitly use all dependencies, but also use all the variables needed. The compiler will give you errors when you have unused variables.

They are upset but will make others happy because they get clean codes.

I think that probably want designers to go, become a language which is largely dependent on IDE.


c# - WCF, containers in DataContract -


मुझे WCF कॉल में कुछ कंटेनर ऑब्जेक्ट पास करना होगा

  [DataContract] Class Foo {// अन्य फ़ील्ड बहिष्कृत [डेटामेम्बर] सार्वजनिक सूची & lt; Foo & gt; मेरी सूची; }  

क्या यह सीरियलाइज़ेशन के लिए ठीक है? यदि मेरे विकल्प नहीं हैं तो क्या?

यह ठीक है, लेकिन परिणामी प्रकार एक सरणी होगा और एक सूची नहीं । मैं अनुबंध में सरणी का उपयोग करने के लिए आंशिक हूँ, बस यह सुनिश्चित करने के लिए कि मैं सूची को किसी और स्थान के रूप में उपयोग करने का प्रयास नहीं करता हूं।


Picking the right SQL Server collation for storage -


How does the SQL Server implement the collation in the case of storage and how it affects Unicode and non-Unicode data types?

  • Is the effect of signaling Unicode storage? Or just control the sorting rules within the database?

  • When I use non-Unicode data types, is the signaling connected to the bond?

  • What happens if restrictions are applied, when I try to store a letter in a non-Unicode data type database matching?

I understand that the Unicode data type can always store a full set of Unicode data, whereas the storage capabilities of the non-Unicode data type depend on the page (which Collation) and can only represent many common characters in that match.

Clearly, each letter will occupy at least 2 bytes in a Unicode data type, while the non-Unicode data types occupy 1 byte per character (or is it how the collation Is there a difference?)

Set me up here, how does this really work?

"post-text" itemprop = "text">

SQL Server stores Unicode data (NTEXT, NVARCHAR) in UCS2, always generates 2 bytes per character.

A matching affects only sorting (and wrapper).

In non-Unicode data types (text, VARCHAR) only one byte per character is used, and only the letters of the code page of the call will be stored (as you said). See it


com - Is PIA embedding broken in .NET 4.0 beta 2? -


Some time ago, I had written some word interop examples in Visual Studio Beta 1, and had set Microsoft's references <<

To embed Office.Interop.Word (set the" Embed Interp "type = correct in the reference properties). This work is fine, and I did not run them for some time ... to date.

Of course, now I am running under both Visual Studio 2010 and Beta 2 of .NET 4.0 - and it seems to be somewhat broken.

There is a code in question (only dummy example code):

  using Microsoft.Office.Interop.Word; Class Word Promotion 1 {Static Wide Men () {App App = New Application {Visual = true}; App.Documents.Add (); Document Doctor = App. Active document; Article paras = Doctor. Paragraph Add (); Paragraph Range. Text = "Best wishes for C # 4"; Object filename = "demo.doc"; Object format = wdSaveFormat.wdFormatDocument97; Doc.SaveAs (filename: ref filename, file format: riff format); Doc.Close (); App.Quit (); }}  

Exceptions of this time get me the most , when the "embed interop type" is set to "right" or "/ l "I'm linking to the command line:

  System.MissingMethodException: Method not found: 'Zero Microsoft.office.inIntext.Word._app.set_visible (boolean)'  

Very rarely, it works - which is even more bizarre.

If I remove the "FT type type" to "false" (or "

if I remove the" visible = true "property setter then it also works ... But I have know that property ... this is also suggested by Intelligence!

Unless I have done complete testing on many boxes, I can confirm that my netbook (Windows 7 Vista, but still .NET 4.0 beta 2) looks at the same problem.

Is there a need Is it broken or .NET 4.0 beta 2?

Great grip! It is indexed properties Our code looks like a bug in generation (one is not known, so thanks for reporting it!) I have tried to build the latest internal VS 2010 and this is the same replica.

What happens is that if you use an object analyzer, the following code is generated:

  Away Day << g__initLocal19 = (app) catalyst.createININSANCE (Type.GetTypeFromCLSID (New Guid ("000209FF-0000-0000-C000-000000000046"))); & Lt; & Gt; G__initLocal19.set_Visible (true);  

However if you set visible = true in a separate statement (without the object initializer), the following code is emitted:

  application application = (application) Activator.rate instence (type gate typefrum CLSID (new guide ("00020 9FF -0000-0000-C 2000-000000000046"))); Application.Visible = true;  

The PIA defines only the lower one, so when you are using an object initiator, it fails. For now the solution is to set visible in a separate statement that should work fine.

I have logged a bug about this again thanks again!


mod rewrite - Question about url rewriting using apache mod_rewrite -


I doubt about rewriting the url using Apache mod_rewrite. I am a newbie in mod_rewrite and I have no experience in regex.

What do I do:

/ for < / web / content / clients /

Strong> / clients / / web / content / public

how can I get things above things

I try Key:

  & lt; IfModule mod_rewrite.c & gt; Option + rewrite on follow-up link for renaming% {REQUEST_FILENAME}! -f rewrite% {REQUEST_FILENAME}! -D rewrite code% {REQUEST_FILENAME}! -L Rivieraith ^ / client / $ web / content / client / [l] reverted arrow ^ (. *) $ Web / content / public / $ 1 [L] & lt; / IfModule & gt;  

But this does not work What do I do?

^ (. *) $ contains a slash in it. Do not include a slash in the rewritten pattern again. But include a root slash at the top of your rewrite paradigm. $ / Web / content / clients $ 1 [L] RewriteRule ^ (. *) $ / Web / Content / Public $ 1 [L]

  RewriteRule ^ / clients $. Code> 

To see the Apache access log and error log, what kind of request URL comes back.

Please, especially the list label "All possible replacement combinations and their meanings here are:"


Xcode 3.2 Debug: Seeing whats in a string? -


Does any display format know that I have to add NSSrring objects to the contents of the summary field to be shown in NSArray? I've already added the formattor for NSArray so that it displays its contents ... <{p>

  "{(int) [$ var count]} objects {(NSString *) [( NSArray *) $ VAR Description]}: "  

 alt text

I would really like to show in "Summary" (marked 0-6):

0 = Monday

1 = Tuesday < / P>

2 = Wednesday

3 = Thursday ... etc

Gary

Let me know this Monday, Tuesday, Wednesday The duvar is found to be displayed, but it has not yet been ensured that:

  1. I started with this code, you describe: < P> NSArray * myArray2 = [NSArray arrayWithObjects: @ "Monday", @ "Tuesday", @ "Wednesday", zero];

    This was not shown in the debugger on Monday, Tuesday, Wednesday, on each line.

  2. This step is important: In the debugger, I clicked on the summary and the paste you used in the given string:

    {(int) [ $ VAR count]} object {(NSString *) [(NSArray *) $ VAR description]}: s

    That was not working

  3. But immediately afterwards, I clicked on the same summary field (I highlighted the pasted string), and then pressed the deleted key, and then click on the return.

    Then it was shown on the array in each row on Monday, Tuesday, Wednesday.


A bug in Flex SDK 3.4?? FocusManager.focusInHandler() -


I have recently upgraded from Flex SDK 3.3 to SDK 3.4. Now I can completely get this error message in full application:

  TypeError: Error # 1009: Can not use the property or method of a blank object reference. MX. Manager :: Focus Manager / Focus Inhandler () [C: \ Autoblog \ Gallaga \ Frameworks \ Projects \ Framework \ src \ mx \ managers \ FocusManager.as: 601]  

This happens Very random, but most often when I click on the tab in Tab Navigator, the problem is fixed when I will add a 'FEBUL = "false" attribute to Tububivator, but I would like to focus on Tab Navigator, and I'm sure As my app Can not fail all the elements.
Someone told me that this is a bug in SDK Is this true? If so, is there any other way than 'Focus Lol =' False '?

Definitely There are problems with updating SDK to 3.4 in this type of I have seen it on many other types of classes. I found that to rebuild the project in reform or to rebuild my work area - in my experience it is corruption in the field and in SDK There is no problem.

I have also seen a problem where you can refer to the library that was compiled using the previous library - in particular I have seen such issues while shaking 3.2 and 3.3.

I'm not 100% confident that this is your exact problem and I am sorry to offer anecdotes instead of just addressing the root causes, but in my experience, this kind of thing is about many environmental-specific issues It is difficult to find out, therefore, it is difficult to find out.

In my case this problem was "flash" package, but it looks like this. I have but your mileage is different, Hopefully it can be different, it helps - if it is not, then comment.


iphone - Block touch propagation to other view -


Yes, I have a child who puts himself on the other brother's thoughts. The problem is that when I touch it, brother also responds to the touch event. How can I disable touch spread on at least brother ideas?

In principle, if you overlap the tab bar, a touch with a specific touch = yes, also This touch should not be answered.

Try setting unique Touch = YES and, perhaps, add the overlay view as a sub-view of the tab. BARController.view (and bring it back).


Foreign key disappears when I do reverse engineering using mysql workbench -


When I use mysql workbench, the schema of reverse engineering disappears

do not know why.

Do you have the solution?

If you are reverse-engineering a mysam database then you will not get foreign keys because they are not by engine Supported you have to switch to InnoDB.


flex3 - How to create a "spacer" in a Flex LinkBar? -


I was trying to get the following: create a linkbar with the width set to 100%, and 4 linkbutton On the left side, the 5th button should be placed on the right side. First of all, I was trying to install 2 linkbar controls in a link, however, it seems that the Flex application was corrupt and a blank screen was generated. Then I tried to put a MX: Spasar in the linkover property of the linkbar, but it does not work either, the spacer expands only about 1 character and did not push the 5th button on the right. Thank you, thank you.

You will need class monkey-patch for it. Linkbar is basically a horizontal box that automatically adds a spacer object to your children. See the UpdateDisplayList method - note that the size of the separator is set with this bit code:

  if ( IsVertical ()) {... separator.setActualSize (separator width, verticalgap); ...} and {... separator.SetUtilities (horizontalgap, divider high); ...}  

You have to change this behavior in some way. My recommendation is that it knows that this is the last spacer in the object (by comparing the loop iterator "I" in the total number of "I" in the hair list) and, if it is, its width is 100% or the same thing A clearly calculated version of

It seems that monkey-patching is the best option for implementing this change, because any attempt to change the size of spacers outside the actual square (in a derived class, for example) Probably will call this method and will be forced to reset the size.

For more information on how to see monkey patch in the classroom, or to update the flex cursor's functionality, it uses the monkey patch.


open source - Commercial OS based on Linux, legal issues -


What can the commercial OS do based on some Linux distributions? Can I distribute such systems without source code?

"Can I distribute such systems without source code?"

No.

You will lose the right to operate, distribute or modify such software, as you lose the rights given under GPL if / when you violate it.

There are many resources to help you with compliance, their goal is compliance, no prosecution.

Honestly, comply with GPL - it is easy to distribute source code is not the most harmful licensing provision. You can pay per-copy royalties.

This can not prevent you from doing things like TomTom, their GPS mapping & amp; Navigation software runs at the top of Linux due to the kernel exception of Linus Torvalds, they need to distribute the source code to Linux and their changes, not the mapping software that runs on it.


codeigniter - mySQL join question -


निम्न पंक्ति एक त्रुटि संदेश दे रही है।

  $ query = 'SELECT * FROM उत्पादों के रूप में पी LEFT JOIN श्रेणियों के रूप में c.id = p.category_id पर उपयोग कर रहा है जहां c.name = "Galleri1" और p.status = "सक्रिय" '; $ Q = $ this- & gt; db- & gt; क्वेरी ($ क्वेरी);  

डेटा बेस संरचना श्रेणियां

  यदि कोई प्रविष्ट नहीं होता है तो `श्रेणियां '(` आईडी` इंट (11) नल एयूटीएक्र्रेमेंट, `नाम' varchar (255) नहीं नल,` शॉर्ट डीस्क 'varchar (255) नल (`आईडी`)) इंजन = माइसाम डिफॉल्ट चार्सेट = latin1 AUTO_INCREMENT (` आईडी`) नहीं है, = 15; ... ...  

PRODUCT

  यदि तालिका में मौजूद नहीं है तो 'टैब बनाएं' (`आईडी` इंट (11) नल एयूटीओएनसीआरमेंट,` नाम `Varchar (255) नाउल,` शॉर्ट डीस्क varchar (255) नहीं, नल, लांगडीससी पाठ नहीं है, 'थंबनेल' varchar (255) नल, `छवि 'varchar (255) नल,` वर्ग' varchar ( 255) डिफॉल्ट नल, `समूहिंग 'varchar (16) डिफॉल्ट नल,` स्टेटस` एनएएम (' सक्रिय ',' निष्क्रिय ') नहीं है, `श्रेणी_आईडी` एट (11) नहीं नल,` फीचर्स` एनएएम (' सच्चा ' 'गलत') शून्य, `मूल्य 'फ्लोट (4,2) नल, प्राथमिक कुंजी (` आईडी`)) इंजन = माइसाम डिफॉल्ट चार्ज = latin1 AUTO_INCREMENT = 20;  

त्रुटि संदेश

  आपके SQL सिंटैक्स में एक त्रुटि है; मैन्युअल जो अपने सिम्युलेटर के लिए सही सिंटैक्स के पास है, उस पर मैन्युअल जांचें जो कि c.id = p.category_id पर 'c.name =' Galleri1 "और p.status =" सक्रिय "'लाइन 1 पर चयन करें * उत्पादों से सी के रूप में पीओई छोड़ें श्रेणियों के रूप में उपयोग करें c.id = p.category_id पर c। नाम = "गैलेरी 1" और p.status = "सक्रिय"  

Q1। क्या कोई मेरी गलती को बता सकता है?

प्रश्न 2 क्या कोई मुझे यह बता सकता है कि यह कैसे Codeigniter के सक्रिय रिकॉर्ड वर्ग में लिख सकता है?

अग्रिम धन्यवाद।

सिंगल उद्धरणों का उपयोग करें, का उपयोग कर से छुटकारा पाएं और जॉइन करें इनर:

  SELECT * से उत्पादों के रूप में पी जोन श्रेणियां एएस सी सीआईडी ​​= पी सी श्रेणी_आईडी जहां सी। नाम = 'गैलेरी 1' और पी.स्टेट = 'सक्रिय'  
  • दोहरे उद्धरण चिह्नों को आरक्षित चिह्नित करने के लिए उपयोग किया जाता है जो शब्द आप तालिका और स्तंभ नाम के रूप में उपयोग करते हैं स्ट्रिंग लीटरल को एकल उद्धरणों में संलग्न किया जाना चाहिए।

  • उपयोग में शामिल हों (col1) का अर्थ है कि आपके पास col1 नामक एक क्षेत्र है दोनों तालिकाओं में और उस पर शामिल होना चाहते हैं यदि आप ऐसा नहीं करते हैं, तो आपको का उपयोग करना चाहिए

  • इस स्थिति को c.name = 'galleri1' में रखना चाहिए WHERE खंड LEFT JOIN को एक INNER JOIN के रूप में ठीक उसी रिकॉर्ड को वापस करने के लिए बनाता है उत्तरार्द्ध अधिक कुशल है (क्योंकि ऑप्टिमाइज़र उस तालिका का चयन कर सकता है जिसमें शामिल होने के लिए अग्रणी हो)।


jquery - Javascript run-time analysis -


I have written a javascript file using javascript, which I want to run on the run-time test. I have never done this before, and just curious about how this was, a site I saw, suggested as a measurement:

  var start = (new date) .getTime () ; / * Run a test * / var diff = (new date) .getTime () - get started;  

It is understandable, right now my script is working on a web page, all of which are the sorted click columns on a table. Apart from real time, what is my interest in knowing, how to interpret time in Big O Notation. Besides, is this script the most standard way of measuring run-time? Your idea is appreciated.

Update: Thank you for your input, Firebug is installed and I'm playing with Profiler. I will try to see if I can come up with an approximation to check time for Big O Notation.

Install Firefox with it, then add console.time ('anyTimerYouWant'); to start timer and console.indend ('anyTimerYouWant'); to end it.

Bigo Notation can not be easily calculated as the program I know.


mysql - How to get data from a joined table -


I have two tables with c.id = p.category_id. I have to get categories. The name but it gives an error Would someone tell me how to get data from a composite table?

  function getGalleryone () {$ data = array (); $ Query = 'SELECT * as PJ categories in products as C.id = p.category_id on ASC where c.name = "galleri1" and p.status = "active"'; $ Q = $ this- & gt; Db- & gt; Query ($ query); / * $ This- & gt; Db- & gt; Choose ('*'); $ This- & gt; Db- & gt; Where ('categories.name', 'Galleri 1'); $ This- & gt; Db- & gt; Where ('products.status', 'active'); $ This- & gt; Db- & gt; Join ('categories', 'categories.id = products.category_id'); $ This- & gt; Db- & gt; Order_by ('name', 'random'); $ Q = $ this- & gt; Db- & gt; Get ('product'); * / If ($ Q-> num_rows ()> 0) {foreach ($ Q-> result_array (as $ line) {$ data = array ("id" = & gt; $ row ['Id'], "name" = & gt; $ row ['name'], "shortdesc" = & gt; $ row ['shortdesc'], ... ... "category" => $ Row ['categories']);}} $ Q- & gt; Free_Ralt (); $ data return;  

database product

  If the 'product' (`id 'int (11) faucet autanarimant,` name' varchar (255) tap faucet, `short disk 'varchar (255) not faucet, not langdishi text, thumbnail varchar (255) tap, `Image 'varchar (255) tap,` class' varchar (255) default faucet, `classification' code (16) The default is' status' nm ('active', 'inactive'), `range_ID` is not an integer (11) no, zero, 'attributes' nm (' true ',' wrong ') zero,` price' float (4,2) null, primary key (`id`)) engine = mice default charge = latin1 aUTO_INCREMENT = 20;  

database categories

  If not, then 'Categories' (`id 'int (11) faucet autn cccment,' name 'varchar (255) not faucet,' short disk 'varchar (255) not faucet,` long dcc' text is not `Stets` Anam ( 'active', 'passive') No, amethyst,` Parentidet` ET (11) NULL, primary ( `Aidi`)) engine = Maisam default charge = latin1 AUTO_INCREMENT = 15; ... ...  

error message

  encountered a PHP error Severity: Information Message: Undefined Index: categories.name File Name: Model / mproducts.php Line Number: 111  

Thanks in advance.

You have "name" with the name "column" by using * in * selected column * Specify in (this will improve performance in any case) such as

  c.name as categories_name  

python - PyQt subclassing -


The usual way to use Qt widgets from Python is considered to be a subclass.

The Qt widget class is a great many methods, so essentially I'm going to end up adding a method for the subclass, as the Python with the same name inherited from the Qt widget In, all the methods are virtual, so I'm worried about it, that some QT code might possibly call my method instead of Qt one - in the worst case, break the case of some edge. Simply do not take the test.

On the other hand, all PyQt methods may only be wrappers for the C ++ code, which certainly will not affect anything in terms of Python subclassing.

> Anyone know how that is the case

if underlaying C ++ If the methods are virtual, your Python methods will be called to call them C ++ code at any time to override them. If they are just regular methods, then any C ++ code will call the original C ++ methods by default (Python code will call Python methods though, because it looks at the Python object and all the methods are "virtual").


CSS - Float Left and Anchor Element -


I have an anchor element that uses CSS class, basically to replace text with an image . I know it sounds weird However, the end result looks correct (for the most part)

.tool link {Overflow: hidden; } .toolEdit {float: left; Background: url (/resources/images/edit.png) no-repeat; Width: 15px; Height: 15px; }

My anchor element looks like this:

  & lt; A href = "#" class = "toolEdit" & gt; Edit & lt; / A & gt;  

When the "float: left" statement is included, then everything looks fine. However, when I remove the "float: left" statement, the word "edit" appears and the image shrinks. I need to remove the float: left because I need to focus the contents in a table column. But as float: on the left side, the content aligns to the left. What should I do?

This should work ...

Your CSS

  .toolEdit {display: block; Background: url (/resources/images/edit.png) no-repeat; Width: 15px; Height: 15px; Text-decoration: none; } .toledit span {visibility: hidden; }  

You can extract overflow: even hidden style ... is not necessary ...

Your HTML

  & lt; A href = "#" class = "toolEdit" & gt; & Lt; Span & gt; Edit & lt; / Span & gt; & Lt; / A & gt;  

sharepoint - how to temporarily disable email notification while updating items in code? -


While updating the item, I'm having trouble with a temporarily disabled email notification, so that the system can send unnecessary emails. The one I am trying to accomplish is to disable the alert, update items, then alert again

SPList agenda = web. List ["work"];

tasklist.EnableAssignToEmail = false; // This property disables mail

tasklist.Update ();

// Update all here

items ["title"] = "new title"; Item.update ();

tasklist.EnableAssignToEmail = True; // Enable email notifications

tasklist.Update ();

As soon as I enable the alert, the changes made in the middle of the code still stop the warning and send the email.
Is anyone better idea to solve this? Thank you.

Is using an SPListItem to turn off alert instead?


openxml - In PowerPoint 2007, how can I position a Callout's Tail programatically? -


I am looking at DrawingML of a PowerPoint 2007 file and it is for coordinates and geometry of callout object:

  & lt; P: spPr & gt; & Lt; A: xfrm & gt; & Lt; A: off x = "2819400" y = "5181600" /> // X, Y callout box status & lt; A: ext cx = "609600" cy = "457200" /> // width, height of callout box & lt; / A: xfrm & gt; & Lt; A: PriestGame Prix = "wedgeRectCallout" & gt; & Lt; A: avLst & gt; & Lt; A: gd name = "adj1" fmla = "val 257853" /> // Position of Tale & Lt; A: GD name = "Exx" "FMLA =" Vel-532360 "/> YY Tail of the lieutenant; A: avylast & gt; & lt; / a: prstGeom & gt; & lt; a: solidFill & Lt; a: schemeClr val = "accent1" & gt; & lt; a: alpha val = "50000" /> & lt; / a: schemeClr & gt; & lt; / a: solidFill & Gt; & lt; / p: spPr & gt;  

I have a problem, it is a formula to say that the tail should be placed in a particular coordinate on the slide. , But it does not work correctly.

  // This is the coordinate and I DistanceX = Coordinate.X - (Callout.X + Callout.X_Ext) / 2 Remote Y = coordinates. Y - (Callout. Y + Callout.Y_Ext) / 2  

But, the geometrical value is not the distance between two points.

Does anyone know what the formula is for calculating?

< Div class = "post-text" itemprop = "text">

I think I have detected the formula:

  DistanceX = Coordinate.X - (callout.x + ( Callout.x_ext / 2)) DistanceY = Coordinate.Y - (callout.i + (callout.Y_Ext / 2)) TailX = (distanceX / CO Lite.x_ext) * 100000 Deliveries = (Remote / Callout. Y_ext) * 100000  

php - change button action to url adress or bash script -


इस तरह एक साइट में एक बटन है:

  & lt; form method = " पोस्ट "एक्शन =" / आमंत्रित / 1233 "& gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "टी" मान = "4 बी 16 डी" & gt; & Lt; बटन प्रकार = "सबमिट करें" & gt; सबमिट करें & lt; / button & gt; & Lt; / प्रपत्र & gt;  

मैं कैसे "अनुकरण" इस बटन उदाहरण के लिए bash में दबा सकते हैं? क्या यह संभव है कि मैं इस बटन के बदले क्लिक कर सकता हूं? क्यों http: // site-domain-here / invite / 1233? T = 4b16d काम नहीं करता?

अपने टर्मिनल पर, मान लें कि आपके पास कर्ल स्थापित है (जो नहीं है?), चलाएं:

  curl -d "t = 4b16d "Http: // site-domain-here / invite / 1233  

-d विकल्प का मतलब है कि अनुरोध POST


आपके प्रश्न के अतिरिक्त आपके जवाब में:

क्यों काम नहीं करता?

इसका कारण यह है ऊपर दिए गए लिंक का पालन करके आप डिफ़ॉल्ट रूप से GET अनुरोध जारी कर सकते हैं; पोस्ट डेटा के साथ एक पोस्ट अनुरोध नहीं है, जो कि वेब पेज / सेवा की आवश्यकता है।

विभिन्न HTTP अनुरोध "verbs" के स्पष्टीकरण के लिए देखें।


inheritance - ASP.NET MVC ModelBinding Inherited Classes -


I have a question about modeling in ASP.NET MVC (I'm using MVC 2 2 Preview 2) Related to Heritage

Say I have the following interfaces / classes:

  Interface Ibbase class base: IBIS interface iCheld class child: base, Ichid  
< P> And I have a custom model binder besomodel builder.

The following tasks are correct:

  ModelBinders.Binders [typeof (hair)] = new besomodelbender (); Modalbinders.bunders [typef (icilied)] = new besodelbander ();  

The following do not work (if you force hair on one type of object):

  ModelBinders.Binders [typeof (base)] = new besodelbander ( ); Modalbinders.bunders [typef (ibiz)] = new besomodelbender ();  

Is there a way to keep model binders for a base class that will be applicable in all heritage classes? I really do not want to input something for every potential heritage class.

In addition, if possible, is there a way to override the Modelbender for a specific heritage class? Say I got this job but I needed a specific modular for Child 2.

Thanks in advance.

I have taken a simple route, I just used all the derivative classes dynamically at the startup using reflection I register. Perhaps this is not a clean solution, but there are some lines in the initial code that just works; -)

But if you really want to mess with those who make model (you're yes


linux - file lock leases via NFS v4 in C -


Does anyone use fax file locking features in NFS v4? (Scroll down for example). It is believed that NFS V4 supports file lock leasing with a life of 45 seconds. I am sure the Linux kernel (I am using the gentleman 2.6.30) is happy to take these details, and I can use the fcntl () and wash it all out Now I am guessing that I have to do something special to get, maintain and stay on the lock lease. All help appreciated.

You are right, fcntl takes care of all of this business for you. Lease Management NFS Client (in Linux Kernel module)


php - Getting dynamic HTML output from another page on a server (perhaps file_get_contents) -


I am using MVC framework code igniter for my work, if it is relevant.

My page / controller, I want to capture output HTML via another page on the site as a string (to use as an email or newsletter). I tried:

  $ string = file_get_contents ('http://www.examplesite.com/path/to/page');  

but $ string becomes just false , what the document says, it means it has failed, I remember some sad thing Coming to ...

Perhaps you can try using curl here is an example here You can see:


javascript - Quickest way to pass data to a popup window I created using window.open()? -


I have a window. There is a JavaScript code to open a popup window using the Open () function. I want to pass the data from that parent window to that popup window and I can not find an elegant or simple solution anywhere on Google or SO, but such a It seems that support must have been made in JS for this. What is the easiest way of data in a popup window?

Thank you in advance for all your help!

Due to security restrictions it is super easy only If the original window and popup are from the same domain then use this:

  // in one variable new_window = window.open ('http: //www.mydomain .com) in the 'Open' command. '); // Get NewWindow.my_special_setting = "Hello World" by using its variable;  

In the child (popup) window, you can access that variable in the following way:

  window.my_special_setting  

Did you want to do something special that wanted to last?


version control - Git: removing a file from being versioned, but not deleting it -


I have a file that has been updated in our repository, but it should not have been for logic, file config .py is we have configuj.tpl version instead but configuring actual output for obvious reasons.

What is the correct way to shutdown this file without deleting the version from the operating directory? Apart from this, it is also to ensure that the next time the repo is not stored and unstarred in the production.

I've already added the file to .gitignore.

Use the following command to remove it from the repository and place it in the tightgear:

  git rm - -cackaged configuration  

Is it possible to compare private attributes in Ruby? -


मैं सोच रहा हूँ:

  class X def new () @ ए = 1 अंत डीईफ़ एम (अन्य) @ ए == अन्य @ ए एंड एंड एक्स = एक्स.न्यू () वाई = एक्स.न्यू () एक्सएम (वाई)   

लेकिन यह नहीं है काम करता है।

त्रुटि संदेश है:

  वाक्यविन्यास त्रुटि, अप्रत्याशित tIVAR  

मैं कैसे दो निजी विशेषताओं की तुलना कर सकते हैं उसी से

कई तरीके हैं

गेटर:

< पूर्व> वर्ग X attr_reader: एक def m (अन्य) a == अन्य। End end

instance_eval :

  class X def m (other) @a == अन्य.instance_eval {@a} एंड एंड  

example_variable_get :

  class X def m (other) @a == other.instance_variable_get: @a end end  

मुझे नहीं लगता कि रूबी की "मित्र" या "सुरक्षित" की एक अवधारणा है उपयोग, और यहां तक ​​कि "निजीकरण" ई "आसानी से चारों ओर काट रहे हैं एक ग्रहक का प्रयोग केवल एक पठन-योग्य गुण बनाता है, और instance_eval का अर्थ है कि आपको आवृत्ति चर का नाम जानना होगा, इसलिए सम्मिलन समान है।


html - CSS Rendering List Items in 2 rows -


Assume that I have

  • elements that are designed to render through float: a fixed The width is left inside the container:

      item 1 | Item 2 | Item 3 | Item 4 Item 5 | Item 6  

    It's okay, item 5 and item 6 are pushing in the second row because the container has a fixed width.

    Now, is it possible something like the above, except that most items will render in the second row? Something like this:

      Item 1 | Item 2 | Item 3 | Item 4 Item 5 | Item 6  

    Actually, I want to present a list of objects horizontally, wrap it in the second line as needed, but if with most items on the second line is present. The number of items that may arise may vary, but can not exceed values ​​of 2 rows.

  • Without a manually defined item that starts with the new line (clear: both;) , Or using Javascript to find out which items should be broken, and similar to the above.


    php - How to get the value of id(primary key) in previous operation in MySQL -


    I am using MySQL, I need to insert a line in the first row, so I entered the row id Have to get. The code looks somewhat like the following:

    in mytable (column2, column3, column4) value ('value2', 'value3', 'value 4' ) Or die (mysql_error ());

    column 1

    primary key

    And this is an auto-increment, how to get the value of

    column 1

    in the previous operation?

    You can use Docs:

      & lt ;? Php $ link = mysql_connect ('localhost', 'mysql_user', 'mysql_password'); If (! $ Link) {die (Could not connect: 'Mysql_error ()); } Mysql_select_db ('mydb'); Mysql_query ("Include mytable (product) values ​​('kossu')"); Printf ("The last inserted record has an ID% d \ n", mysql_insert_id ()); ? & Gt;  

    iphone - Image Picker Issue -


    We have a problem with the image picker in our app when the camera is launched to take an image, then our The app restarts and displays the main screen. Can anyone put some light on this issue?

    Thanks in advance.

    I have seen that the camera needs a lot of memory when I take a picture, then the phone I send memory alerts and are issued to see the controllers. There is no problem in my case, but I think your app is using a lot of RAM. When you get memory warnings, you have to try to release something.


    php - selecting rows that are older than current date in mysql -


    I have a mysql table with fields for a start and end date / time.

    How do I select lines older than the current date using Php?

    The expiration date format is 2009-11-25 08:01:00 and the field type is datetime

    The timestamp provided and MySQL are in the same timezone, you can only compare.

      SELECT * FROM tbl WHERE date_col & lt; Now ()  

    graphics - Blackberry app, how to add an image on top of another image file? -


    I am trying to develop a small map-like application for BlackBerry. I have to know how I can put a small image on another big image.

    The big image is like a map, I will need to point to a specific position to shorten that image. Therefore, the small image should be at the top of the large image at the same time, I will need to move the map, and the small image should follow that condition on the map.

    Does anyone know that there is a specific API for this problem?

    Icon icon on top of the map bitmap sample bitmap:

      Square Scr increases the main screen {bitmap membmatmap = bitmap.jetbitmap resource ("map"); Bitmap mIconBitmap = bitmap.getbitmap resource ("icon.png"); Bitmap overwhelpbitmap (bitmap map, bitmap icon) {graphics g = new graphics (map); Int width = icon.getWidth (); Int height = icon.getHeight (); Int x = (map.getWidth () - width) / 2; Int y = (map.getHyight () - height) / 2; G.drawBitmap (x, y, width, height, icon, 0, 0); Return map; } Public Scr () {add (new Bitmapfield (getMonkeyBitmap, mIconBitmap)); Create the array of bitmap  
  • Create graphics with a new bitmap and draw all the bitmaps with defined alpha values ​​
  • Use custom class to save bitmap PNG image

    See example

      Class Scr is expanded on main screen {bitmap [] images = new bitmap [0]; Int width = Display.getWidth (); Int height = Display.getHeight (); Bitmap bitmap = new bitmap (width, height); Bitmapfield bitmapfield = new bitmapfield (bitmap); Public Scr () {add (bitmapField); } Menu itemMedbitmap = new menu item ("add image", 0, 0) {public wide run (bit) {bitmap image = bitmap.jetbitmap resource ("img" + (image lamp + 1) + ".png"); Arrays.add (picture, image); Fresh (); }}; MenuItem mClean = New Menu ("Clean", 0, 0) {Public Zero Run () {images = new bitmap [0]; Fresh (); }}; MenuItem mSave = new menu item ("save", 0, 0) {public zero run () {string mFileName = System.getProperty ("fileconn.dir.photos") + "test.bmp"; // bitmap byte array conversion byte [] bitmap buffer = new byte [0]; PNGNcoder encoder = new PNG encoder (bitmap, true); Try {bitmapBuffer = encoder.encode (true); } Hold (IOException e) {e.printStackTrace (); } Write file (bitmap buffer, mFileName); }}; Private Zero write file (byte [] data, string filename) {FileConnection fconn = null; Try {fconn = (FileConnection) Connector.open (fileName, Connector.READ_WRITE); } Hold (IOException e) {System.out.print ("Error opening file"); } If (fconn.exists ()) try {fconn.delete (); } Hold (IOException e) {System.out.print ("error in file removal"); } Try {fconn.create (); } Hold (IOException e) {System.out.print ("Error creating file"); } OutputStream Out = Null; Try {out = fconn.openOutputStream (); } Hold (IOException e) {System.out.print ("Error opening the output stream"); } Try Out {Out.write (Data); } Hold (IOException e) {System.out.print ("Error writing in output stream"); } Try {fconn.close (); } Hold (IOException e) {System.out.print ("Error in closing file"); }} Zero Refresh () {bitmap = new bitmap (width, height); Graphics G = new graphics (bitmap); For (int i = 0; i  

  • internet explorer - http proxy for debugging purposes -


    I'm looking for free HTTP proxies primarily to use for debugging purposes.

    I already have firebug and firebug lights in my device set but firebug lights will not see AJAX requests in Internet Explorer.

    I thought that a blocking proxy could be achieved

    I recommend . It lets you track all traffic coming and coming in your app, everything changes between, to change the middle, etc.


    javascript - iPhone Web App disable cache -


    I have created an iPhone webpage using PHP in the main (and only) pages apple-mobile-web- App-enabled and apple-touch-fullscreen meta tags, so that it can run fullscreen once in the home screen. However, it seems that every time I launch the app from the homescreen, instead of refreshing the page, the cash version of the page is used (and, of course, I need to update the page at startup, And here Ajax can not be used - it needs to be dynamically authenticate user with SSO phpCAS) I did not use any manifest file About cash without user attempts to add a meta tag. Does anyone know how to fix this?

    Thanks

    What have you tried the meta tag?

      & lt; Meta HTTP-EQUIV = "Cache-Control" CONTENT = "NO-CACHE" & gt; & Lt; Meta HTTP-EQUIV = "PRAGMA" CONTENT = "NO-CACHE" & gt;  

    Do not tell the safari to cache, but I did not try them.

    You can use any of your "real" startup pages from the cached page using javascript to make unique URLs unique, such as random numbers.

    This can also work for the main startup page, but I doubt it. Try though.


    I recommend that the cached page only loads a new page, if it is on the slider:

    Invalid suggestion:

      Window.onload = function () {if navigator.standalone} {document.location.href = 'http://your.com/whatever.php?randomjunk=1234'}}}  
    < P> So if the page is in the browser, it can give instructions on saving to the Home screen and if it is run from the Home screen, it will load the actual page.


    php - Zend_Auth_Adapter_DbTable to authenticate users -


    I am starting with the Zend Framework and I want to use Zend_Auth_Adapter_DbTable to authenticate my users ...

    I saw the documents, which looks quite straight forward, but I am getting an error.

    Here is my code snippet:

      $ adapter = new Zend_Auth_Adapter_DbTable ($ this-> _dbAdapter, 'user', 'username', 'password', 'MD5 (?)'); I have a 'User' table with the 'Username' and 'Password' column, but every time I run 

      $ result = $ adapter- & gt; Certified ();  

    I get an application error:

      Message: The parameter given for Zend_Auth_Adapter_DbTable failed to create a valid SQL statement, please validate Check the table and column names for  

    Can anyone help me with this? I just want a basic authentication (password is encrypted using MD5)

    The strange thing is that the following tasks ...

      $ adapter = new Zend_auth_adapter_DbTable ($ this -> _dbAdapter); $ Adapter-> Settnet name ('user') - & gt; SetIntiTy column ('username)' - set credential column ('password') - & gt; Set IDTT ($ username) - & gt; Set credentials (MD5 ($ password));  

    But why the method fails (or use it as the first code snippet) "set credential treatment" ...

    That's because I have sqlite3 and my sql

    Thanks

    It looks like SQLite MD5 () < You need Tcllib and Trf to use / code>.


    iphone - I want to scroll to a row in a table view, select the cell then deselect it, but its being deselected before i see it -


    after

    im down

    using the code
      [sampleListTableView scrollToRowAtIndexPath: indexPath atScrollPosition: UITableViewScrollPositionMiddle Animated: Yes]; [Select SampleListTableViewRockoutPath: IndexPath Animated: Yes ScrollPosition: UITableViewScrollPositionMiddle]; [Unselect SampleListTableViewWindexpath: Animated Pathway: Yes];  

    Behavior I see that the table will scroll to the visible path (this is) then the cell is a momentary selection (which is it is on the cell screen)

    im thinking that the book animation is threaded and before the cell is being selected on the screen, it is when I select this code with the cell on the screen and call it as follows In a way confirmed the dislike.

    Anyone have an alternative solution? I can do it in this way (without book animation), but it is not as sweet, in fact very sudden

      [sampleListTableView scrollToRowAtIndexPath: indexPath atScrollPosition: UITableViewScrollPositionMiddle Animated: NO]; [SampleListTableView selectRowAtIndexPath: indexPath Animated: Yes scrollPosition: UITableViewScrollPositionMiddle]; [Unselect SampleListTableViewWindexpath: Animated Pathway: Yes];  

    After

    I'm not sure, but you have to implement some representative methods of the UIScrollViewDelegate Protocol Can try Like Smth

      - (zero) scrollViewDidEndScrollingAnimation: (UIScrollView *) ScrollView { 

    and deselect there


    Hibernate Search question -


    I am using Hibernate Search and implementing Lucene indexing on a table for a domain object. I want to select from this table for domain objects and apply filtering based on the other table, which is not indexed.

    For Exxple, I have a lot of tables in the auction, which I have indexed. And I have the quote table, there are many references to the auction in quotes.

    I want to conduct a full test search in the auction table and there are no quotes in the matched organizations. In normal SQL it will be received by JOIN

    But in the case of Hibernate search, I have to do a complete test search to get domain objects, but I do not know how to filter with JOIN.

    Is any body's idea of ​​how to do it?

    Do not recommend filtering while indexing for your search primarily because it is not supported by Hibernate Search But this is also because it has no meaning what you should do in my opinion, that is the object you want to find, which involves the relation of the 'child' object. I believe your Exclamation Object will have your quotation objects S One-to-many relationship. With the @ index embedded annotation, you can mark your quotation marks as objects that should be indexed. When you do search quests without quotes, you can filter your search in your search query either by applying global filters for your search. It can be provided by hibernation by the search.


    vb.net - How do you declare a C# variable into an HTML type variable? -


    is equal to c

    so that you can use it for web forms in the PayPal API integration ?

    What is to read on the dressing of the C # variable for the HTML side of your web or client side, which you have declared that can:

      input type = "Hidden" name = "Name_type" value = 'textbox1.Text'  

    can i change the default encoding of my mysql server from latin-1 to utf-8? -


    Can I change the default encoding of mysql server to my computer from Latin-1 to UTF-8?

    Be sure you can use your MySQL GUI software or the following questions Can run:

      // multilingual support mysql_query ("SET NAMES 'utf8'") utf8 charset; Mysql_query ("set character settings utf8"); Mysql_query ("SET character_set_results = utf8"); Mb_language ("uni"); Mb_internal_encoding ("UTF-8");  

    Adding external images to PDF using iText -


    I have to find out how to add an external image (referenced by a URL) using iText to add PDFs. Is such a thing possible?

    In 7.1.5, the PDF device says that you should be able to use a URL specification in a PDF context through a URL. This is what I have so far received:

      PDF file display pdfSpec = PdfFileSpecification.url (author, "http://www.someurl.com/test.jpg"); Stringbuffer input speed sbis = new string buffer input (""); PDFForm = New PDFForm (SBIS, Author); Dict.put (PdfName.FILTER, PdfName.DCTDECODE) dict.put (PdfName.TYPE, PdfName.XOBJECT); Dict.put (PdfName.SUBTYPE, PdfName.IMAGE); Dict.put (pdf. Width, new pdfnm (100)); Dict.put (pdfname.high, new pdfnm (100)); Dict.put (pdfName.bitSPERCOMPONENT, new PDFF (8)); Dict.put (pdfName.LENGTH, new PDFF (0)); Dict.put (pdfn .f, pdfppec); PdfIdirectObject img = writer.addToBody (dict);  

    I know that I still need to make sure that color space is added and stuff, but my main concern is just getting this document in the main part of the document. I can not understand how to do this ... It seems that I can not find a PDF page or resource dictionary or anything. Is it possible to use iText?

    As a side note, this exercise is useless if I try to load the image image when being presented with a security alert. Does anyone know that this is the case?

    The external content is described in the PDF device, but almost the PDF processor actually supports them Acrobat 9 has support for this, but I would be very cautious with that facility: Your customer or user will not be able to see the referenced content.


    How can Mercurial be copyright and free software? -


    I was watching the version of my follower and I do not know how it is that it can be copyrighted and free Software at the same time.

    Mercurial distributed SCM (version 1.3.1 + 7cea12e70129)

    Copyright (c) 2005-2009 Matt McCall and others it is free software; See the source of copying conditions, there is no warranty; Not even for business or fitness for a particular purpose.

    All software, even free software, copyright is free software license The meaning is that copyright holder is providing rights to use, modify and distribute software under certain conditions. The reason for this is allowed to be done in the first place because they are the copyright holders and thus determine the terms of the software's use.

    In fact, this idea was so novel about GPL in the first place: It uses the framework of copyright law to implement delivery terms for the software covered by the license.


    .net - Is there a workaround for the unsupported IParameterizedType in Fluent NHibernate? -


    Temporary NHibernate is currently, but I need to use fluid mapping because I adjust the mapping within my code Want to

    Is there a way for natural NHibernate that in some way injects XML standards that will be used in normal mapping XML-file?

    I have already received similar questions but the answer given does not seem to work with unhealthy NHibernate 1.0.

    I want to use fluent mapping because I want to have my code I want to adjust the mapping inside.

    You do not need to use fluent mapping to adjust the mapping with your code. NHibernate supports dynamic mapping


    android - How can I create a menu? -


    I want to make a menu What's my problem? I think that is true but it does not work. I do not want to use boolean.

      onCreateOptionsMenu (menu) {menu.add (1, 1, 1, "setting"). SetIcon (android.R.drawable.ic_menu_manage); } Selected items from item (switch) {switch (ITAT. ITMID)} {case 1: intent level = new intent (activity_man.This, activity_man 2. class); StartActivity (move); break; }}}}  

    you true in , I want to show the menu "Do not forget to call the code via the> Optional menu Super.

      @ Override Creative Options menu on public boolean (menu menu) {super.onCreateOptionsMenu (menu); Menu.add (1, 1, 1, "setting"). SetIcon (android.R.drawable.ic_menu_manage); Back true; }  

    vlc - What are possible values for --rawvid-chroma -


    I am trying to see if I can do NV 12 through VLC. I see that there is a switch named "--rawvid-chroma" "NV 12" does not work, but "I420" does not work - I'm curious that --rawvid-chroma

    What is a valid string for

    This video page looks like it may be a list of potential VLC chroma values. It includes YUYV which works for me and I420 but NV12 is not included in it

    RV24 and RV32 find that they can be 24 bits and 32 BTR RGB.


    assembly - fasm, searching a word in dos environment -


    Take a word from the exercise keyboard, search for the DOS environment and if it is the word, then display the line with this . The word dos from the environment

    Here is my code:

      format binary org 100h start: mov es, [ds: 02ch] xor c, c, **** *************** ********************************************************************************** ******************************************************************************************** Mov Mov , 9 mov dx, string integer 21h mov ah, 10 mov dx, word integer 21h mov ah, 0 integer 16h; ************** ************************************************************************************ **************************************************************************************************** Mov di, $ - word jge equal to mov dl, [es] si mov mov, dl mov dl, [bx + di] cmp dl, [string + di] jne di add next_line, 1 jmp start_while next_line: ink cmp dl , 0 jns nonst equal: mov ah, 2 int 2 1 hour jmp end notexist: mov ah, 9 mov dx, d_exist integer 21h jmp end end: mov ah, 08h integer 21h retired; ********** **************************************************************** **************************************************************************************************** ******************************** String Database 'word:', 10,13, "$ "The word db 6 db 0 times 22 db" $ "d_exist database 'variable does not exist', 10,13," $ ' 

    The compiler says: MOV DL, [DL + D ] Error I am an eater, how do I fix the code? I do not know.

    some

    issue first Apart from mentioning the 86 Base Plus Index with the address, here are additional questions and problems, some of which are available to you Moving forward to the desired results:

      started: mov es, [ds: 02ch] xor si, si mov ah, 9; writes the word: mov dx, string int 21h mov ah, 10 ; User accepts the word "word" mov dx, in the word int 21h; reads the buffered input for "word"; reads the keyboard key; -> **** Why? Input only INT 21 / AH = The above was read with 10; mov ah, 0 int 16h; ah = scan code, ax = ascii four ereddy, die xer bx, bx startieth: mov di, $ - word; Current location detected; Void address of "word" - -> Why? ; The last operation to affect the flag were xor bx, bx, which resulted; In zeros, this jump will always take the jazz equals ... Even all the codes are left equal to 'equal' label: mov ah, 2; Type Dl in stdout; - & gt; *** But the content of DL is unknown 21h jmp end; Exit the program  

    You should be able to understand why you do not see any output or why your terminal closes (possibly in dl ) The control letter. / Code> $ - word in mov di, $ - word not the word length at the word . $ symbol indicates the address of current location in which $ is displayed, so in the above, it actually So, if you want the length of the word, you will get the the word di After should set a new data object, it is a normal pattern to make an object after the definition of word :

      word db 6; It defines one byte, value = 6 db 0 times 22 db "$" word_len db $-word; The length of the word is current - the word of "word" R; I accept all 24 bytes for "word"  

    javascript - dat.GUI create multiple buttons with same name -


    I try to use dat.GUI to create multiple buttons with the same name "ShowCoord" it's possible? What I currently have:

     for  (i = 0; i  

    Now I have the correct crowbo ['name'] and Karob ['numerical'] has been displayed. But all "ShowCoord" buttons only contain information about the last sub-oboj (the console is the "I have" + subobject ['index'], every time I click on the separate button on 148). How can I make it work? Thanks a lot!

    out of sub-go for loop Try and modify the code so that you do not reassign it to Subgui varialbe.

      var subGui = new dat.GUI (); (I = 0; i & lt; subObjArray.length; i ++) for {var currObj = subObjArray [i]; SubGui.addFolder (currObj ['name']); // & lt; --- Work on this line subGui.add (currObj, 'numVertices'); SubGuide (Carogeb, "Showcard"); }  

    Otherwise it will always be redefined with the last running element of loop


    : this is just a hint That is, I can not get more conclusions than your code


    Playing sounds in Python without external module? -


    I searched for it, and in every answer the external Python library is included, sounds To run such a Pygame , snack , etc,

    play a .wav file without the use of external modules Is there a simple pure dragon way built into the module? I know that Python did not originally support .mp3 files.

    In that respect, I have found the most I have nothing to set up; Simply import it However, as you can guess, it only works on Windows when I want the sound, then I use PagMem, its support is limited to MP3 files, and it requires an installation (Unless you package your app), but it is the simplest of third-party audio modules.


    How to upload local PowerPoint file to SharePoint directory via Python -


    I am automating some of my reports and need the ability to upload files to a SharePoint directory on which my Have close access. The target script must be run through the task scheduler (which I already know how to set up).

    It is not certain where to begin with this, but I have seen some threads which it is sharingpoint and request modules, but still some are stuck.

    Any help is greatly appreciated. Thank you.

    I have suggested that the command line approach was eliminated, and I put it together that work Well done:

      Local network drive # os.system ('net use r: {}'. For the SharePoint directory (any open operation works)) format (sharepoint_url) # Upload updates the local file to the SharePoint directory os.system ('copy {} r: \ {}'. Format (output_file_path, output_file_name)) # Disconnect map network drive OSSIMT ('NET Use r: / delete ')  

    Hope it helps someone in the bottom line.


    sql - INSERT INTO with SELECT using OUTPUT -


    मैं pt_id को मेरी अस्थायी तालिका में OUTPUT , हालांकि मैं pt_id को ct_tarf में सम्मिलित नहीं कर रहा हूं, मुझे क्या करना चाहिए?

    मुझे निम्न त्रुटि मिलती है:

    बहु-भाग पहचानकर्ता 'pt_id' बाध्य नहीं किया जा सकता।

    प्रश्न: < / P>

      DECLARE @tbl_ids_tarf TABLE (pt_id INT, pt_id_tarf INT) INSERT dbo.ct_tarf (tr_id_serv, tr_name, tr_money) OUTPUT pt_id, inserted.tr_id में @tbl_ids_tarf (ptr_id, ptr_id_tarf) SELECT pt_id_serv, pt_name , Pt_money FROM dbo.opr_prop_tar WHERE pt_id_tarf  

    SQL2008 +:

    यह मानते हुए कि आप @tbl_ids_tarf में प्रविष्ट करना चाहते हैं (जो OUTPUT ... में खंड का लक्ष्य है) उन कॉलमों से मान जिन्हें इनके द्वारा नहीं लौटाया गया है डाला गया या हटाया गया वर्चुअल टेबल तब एक समाधान का उपयोग INSERT के स्थान पर है:

      DECLARE @Target TABLE (कॉल 1 आईएनटी) निगमित मूल्यों (1), (2); DECLARE @Output TABLE (Col1 INT, ColB INT); ; स्रोत के रूप में (से चुनें * FROM (मूल्य (10, 100), (20, 200), (30, 300)) x (कोला, कोलब)) @ लक्ष्य में x का उपयोग कर एक्स x.Col1 = y कोला जब लक्ष्य से टारगेट नहीं मिला तब (कॉल 1) वैल्यू (y.ColA) डाला गया। कॉल 1, वाईओ कोबॉल @ ओटपुट (कॉल 1, कोलब) में; - ^ - y.ColB डाला या हटाए गए आभासी तालिकाओं द्वारा वापस नहीं किया गया है। - डाला और हटाए गए `@ लक्ष्य` सारणी [चर] पर आधारित हैं SELECT * FROM @Output; / * Col1 ColB ----------- ----------- 10 100 20 200 30 300 * /  

    MS Excel to Database -


    I am looking for a way to transfer excel files to a database (the customer is called mbox. How to transfer Excel to a database?). At least I want a script for writing INSERT-commands for me but I tried it with PowerShell but went into a big problem: I can not write the proper for every-loop for this task:

    < Pre> if ($ Args.count -q0) {"no parameter-error" exit} "if ($ Args.count -gt 1) {" many parameters-error "exit} if (-not (Test-path $ Argos [0] -Neave * .csv) {"Invaild root or not CSV-file" exit} $ spalten = import- csv $ args [0] - "delimiter"; "$ Spalten.GetEnumerat Echo $ ($ _. Value [$ of]) + "` n ";} P> Please help, also know that I do not know what will be the name of a column.


    sql - Error from MS Access ODBC--call failed -


    I am enclosing my MS Access database to connect to local SQL Server from SQL Server.

    I thought things are getting very good and then suddenly, out of my other questions, I am facing this error:

      [microsoft] [odbc] SQL Server Driver] [SQL Server] '=' has the wrong syntax (# 102)  

    Any ideas or suggestions will be most useful.


    batch file - Open URL with a set Target -


    Edit: The solution I want is a command line to complete it Can be run batch file in windows.


    How do I copy a browser function to open a URL with a specific goal so that the tab is already open, will it load instead of creating a new tab?

    Therefore, instead of default with the target "_blank", I can change it to "w00t" etc.

    I am using only chrome, so if it is a chrome specific order, which will be acceptable.

    You can create an HTML-page and add the following code like this:

      & lt; Script & gt; Var url = getQueryVariable ("url"); Var target = getQueryVariable ("target"); Window.open (url, target); Function getQueryVariable (variable) {var query = window.location.search.substring (1); Var vars = query.split ("& amp;"); (Var i = 0; i & lt; vars.length; i ++) for {var pair = vars [i] .split ("="); If (pair [0] == variable) {return pair [1]; }} & Lt; / Script & gt;  

    I have to host this script:

    You can tell it from this batch file:

      START Scriptcoded.github .o / redirect? Url = http: //www.google.com& target = w00t  

    Use url = http: //www.google.com& Target = _blank to set the redirect.

    The problem I have with this method is that some browsers block new windows and tabs will not be closed. Yes, we use the window.close (); , but it will only close the tabs that were opened by the webpage.

    Hope it helps!


    php - How to update .htaccess in virtual host -


    Today I got a website from the UI developer. I changed the * .php * .html code to * .php It runs well on the local server after posting it to the online server, I failed to load

      resources: the server responded with the status of 500 (internal server error)  

    After this googling, I have learned that I need to change the .htaccess file.

    But I had created my virtual host a few days ago. Instead, I found three files in / etc / apache2 / sites-available / I / O

      / etc / apache2 / sites-available / default  

    .

      000-default.conf default -ssl.conf tangelotown.org.conf  

    The contents of tangelotown.org.conf

      & lt; VirtualHost *: 80 & gt; # Server uses name instructions, request scheme, hostname and port that the # server uses to identify itself, it is used during the # redirection url formation. In the context of the virtual host, the server name # specifies what host host hosted in the hostname: Header # matches this virtual host This default value for the default virtual host (this file) is not valid because its use Used as a last resort host. # However, you have to set it explicitly for any further virtual host. ServerName tangelotown.org Server Alliance www.tangelotown.org Server Admin President @ tangelotown.org DocumentRoot /var/www/tangelotown.org/public_html # Available loglevels: trace8, ..., trace1, debug, notice, notice, warning, #default It is also possible to configure loglevel for the special module, for example, criticism, alert, rise. #LogLevel info ssl: warning errorLog $ {APACHE_LOG_DIR} /error.log Custom Log $ {APACHE_LOG_DIR} /access.log for Combined # config / available for more configuration files, which are enabled or disabled at the # global level, it is possible # Includes a line for only one special virtual host, for example # the following line enables the CGI configuration for this host # Then there is a worldwide disable with "a2disconf". #include conf-available / service-cgi-bin.conf & lt; / VirtualHost & gt; # Vim: syntax = Apache ts = 4 sw = 4 sts = 4 sr noet  

    In this file

      & lt; The directory / var / www does not include / & gt; Follow Option Index Simlinks Allow Multiviz; Allow Override All Orders, Allow All & lt; / Directory & gt; As explained on the site  

    Please help me solve this problem. My site is

    Try adding the directory stenza before the virtualhost stenza, but you probably want to change it The directory is

      & lt; Directory /var/www/tangelotown.org/> Follow Option Index Simlinks Allow Multiviz; Allow Override All Orders, Allow All & lt; / Directory & gt;  

    sql - XML DML Replace with a Function Result -


    I would like to dynamically replace the value of an XML element, in which the selected XML values ​​obtained from the table The replacement should be done by a function that I want to call. I can not find any clue to point me in the right direction ...

    I have the code snippet (incomplete) which I believe is the right structure to use XPath I want to know that element, and XPath are interested in me (one or more), from there I have no idea how to remove the result of the function, and ideally a SQL: place in the column Give:

    First of all, if you want to update the table data from a function, you do not have permission to do it. Can use proc You can dynamically send it to the 'Replacement value' statement (above from the syntax) and send the value with which you want to replace. There is some code to show what I try to say I am doing:

      create PROC changeXML @xmlPath nvarchar (max), - statement 'value of the value' @value nvarchar (max) - Start as new value @ path string ethics ( Maximum), @Saikal NVARAAR (Max); - Complete statement Modesty set the SET @ pathString = '(* + @ xmlpath +' text, change the value of ()) ([ ']' as well ( " '+ + value +' ')'; SELECT @pathString; - Create dynamic SQL and pass it passrescence. SET @sql = 'UPDATE [dbo] [Table withXmlData] SET a.modify ('' p @ '') '; - Dynamic SQL excel SP_X acutexclose @ SQL, execute 'NPP Encyclopedia (Max)', @ P = @ path string and  

    then run some such process:

    < Pre> EXEC [dbo]. [ChnageXML] @xmlPath = N'path to its xml value,'value = n'new value '

    html - Hot to get svg inside a span using jQuery's find() -


    I am having difficulty in selecting a svg element (actually written as img and later jquery Has been converted to SVG to use).

    The code is:

    HTML:

      & lt; Div class = "tab-content" & gt; & Lt; Div id = "personas" class = "active" & gt; & Lt; Span id = "boton_auto" & gt; & Lt; Img class = "svg" src = "img / auto.svg" /> & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

    and jQuery

      $ ("Tab-content div span"). ("Svg") Search AddClass ("activo");  

    What can be the problem? thank you in advanced!

    You may have the first or complete line before svg

    : $ ("Tab-content .svg") AddClass ("activo"); Edit Edit: I saw the code that replaces it with a SVG. It comes in asynchronous form. Are you running before your search line? Line $ img.replaceWith ($ svg); Try adding line directly after


    sql - Getting parsing error with the following case statement in Cognos -


      मामला जब ([JOB_CLASS] = 'T') तब [SQL2]। [ESTJOBDURATION] / 60 अन्य 0 अंत  

    यह एक डेटा आइटम के लिए मेरे पास परिभाषा है। डेटा वस्तु कॉग्निज प्रॉपर्टी फलक में कुल कुल फ़ंक्शन का उपयोग कर रहा है मैं घंटे में अनुमानित नौकरी की अवधि को पूरा करने की कोशिश कर रहा हूं जब नौकरी वर्ग टी के बराबर होता है।


    python - Data sorting within lists within dictionaries within files -


    Although I searched around, I did not find specific coding related to my program.

    I have a program that loads into a file that is used for pickling, the data is stored as a variable, there is a dictionary with values ​​in the data list format. I have been assigned a task to sort the dictionary with the highest score for each key and then from highest score to highest

    apart from this, I have to present my findings in a user-friendly way, so Climbing the loop may be necessary.

    You can create an array from the list with numpy.

    or manual:

      Numpy import asarray myarray = asarray (mylist)  

    and then sort ()

    or manual:

    K., V. for
      dict = {'3': 'AC', '2': 'FAS', '4': 'ABA'] ARR = [] In. Dictitems (): arr.append ([k, v])  

    and then arr.sort () if its one-dimensional, or

    < Pre> print sorted (arr, key = lambda x: x [0], reverse = true)

    if its multi-functional

    Edit After discussions in comments:

    Do you need it? [2, 3, 1], 'john': [3, 2, 4], '' [1, 4, 2], 'Steve': ' Thomas': [4,1, 3]} for arr = [] dict.iteritems () in k, v: arr.append ([k, v [0], v [1], v [2]]) Print sorted (arr, key = lambda y: y [1]) # Sorted from first number (arr, key = lambda y: y [2]) # Second number printed sorted (arr, key = Lambda y: y [3]) # After the discussion of the third number,

    EDIT2

    This is fine for me Most doubt, and I hope some dragon gurus will improve this. [3, 2, 4], 'Thomas': [1, 4, 2], 'Steve': [2, 3], 'John': [3, 2, 4] : [4,1, 3]} for arr = [] k, in dict.iteritems (V): new = [k] # add I in the list for all values ​​(0, Lane (V)): new .append (v [i]) # If a list is small then 4 items, add it to add zero, while len (new) & lt; 4: new.append (0) # main list in the new list arr.append (new) print arr print sorted (arr, key = lambda y: y [1]) # printed from the first number (arr, Key = lambda y: y [2]) # Second number printed sorted (arr, key = lambda y: y [3]) # By third number

    0 if you want empty people on the other end of the sort, then from time to time 999 in the loop.

    Hopefully this will complete it, though this file may be a little late.


    excel - Spreadsheet stored on Sharepoint needed in Access -


    I have a spreadsheet that is stored on the SharePoint site and I want to link to this spreadsheet to create a "live" I have a table in my Access database when I get a link from a data source by creating external data-> Excel-> a linked table, I get an error because the file path starts with http: Is there a workaround for this? Thanks!

    You can not link to a web site, or a file sitting on some web site. You must use the Windows Media Networking System to work ()

    You can download a workaround file locally in this way, and then link to the local file.


    Time complexity of this unique string algorithm -


    I am preparing for an interview and have come across a question where you can find all the unique characters in the string Let's try.

    I have come up with an algorithm.

      The public static boolean is the unique chars (string str) {char [] charArray = str.toCharArray (); Maps & lt; Character, integer & gt; CharCounter = New TreeMap & lt; Character, Integer & gt; (); (Char i: charArray) {if (charCounter.containsKey (i)) returns incorrectly; Other charCounter.put (I, 1); } Back true; }  

    I'm looking for a loop, so it's at least O (n). I believe that lookup in Hashp is also O (N). So does it make my algorithm o (n ^ 2)?

    And if it is O (n ^ 2), then how is it better to loop than nested, where I array the rest of each character? It will also be O (N ^ 2) thanks

    has it in ' S and. With this, the time cost of your algorithm is O (n log n). Since you do not need the values ​​in your map, you can use a set, eg. HashSet or TreeSet instead

    It would be better to compare each string with the remaining string if you do not want to allocate the O (σ) memory (i.e. the size of the alphabet) match.


    C# pass element of value type array by reference -


    I want to pass an element of an array from the reference (value type element in array, not ref type).

    Is this possible? Thank you

    Yes, this is absolutely possible, just like you pass any other variable from context Do:

      using the system; Class test {static zero main (string [] args) {int [] value = new int [10]; Fu (referee value [0]); Console.WriteLine (value [0]); // 10} static void foo (ref int x) {x = 10; }}  

    This works because arrays are considered "collections of variables", hence the value [0] is classified as a variable Is - you will not be able to list & lt; Int & gt; Do, where the list [0] will be classified as value .


    mysql - Complex querying on table with multiple userids -


    I have a table like this:

      Week's status of score ID 1 1 0 2 1 1 3 1 0 4 1 0 1 2 2 2 2 1 3 2 0 4 2 1 1 3 1 2 3 1 3 3 1 4 3 0  

    I get all the IDs Those who have zero status for all week other than the week. Something like this:

    Result:

      Result: ID w1.status w2.status w3.status 1 0 0 1 3 0 0 1  

    I have this question, but it is very inefficient on large datasets.

      select w1.id, w1.status, w2.status, w3.status (s.id, s.status score, s.week = 1) w1 left JOIN (Select s.id, s.status score by WHERE s.week = 2) w1.id = w2.id on w2 (selection s.id, s.status score where s.week = 3) on w3 W1.id = w3.id WHERE w1.status = 0 and w2.status = 0 and w3.status = 1  

    I look for a more efficient method to calculate the above I am here.

      select the digits from the ID, where in the week (1, 2, 3) ( In case when the week (1, 2) and position = 0 then 1 when week = 3 and position = 1 then 1 and 0 end) = 3  

    or more generally ... Select the ID from the score group through ID (case = 0 then in case 1 and 0) = count (*) - 1 and min (case when position = 1 then tap end of the week) = maximum (week) < / Code>


    ruby on rails - Stop Braintree paypal in modal opening in new tab -


    I need to show PayPal in the model, when the user presses the button, it just opens a new tab, which is not Is great UX

    Not found in document

    I am a developer in Braintree Know that you have any other questions at support@braintreepayments.com

    Braintree's salary with Paypal integration has always been a pop-up hosted on a PayPal domain in all the environments and browsers The window will emphasize that this support means that you can not show PayPal in a model; Whether it does or not, it will be decided based on the browser you are using. The reason for this is that if you can see the paypal domain name in your browser's location bar, it provides a high level of verification.

    Braintree Docs will be updated to display it.


    objective c - proper use of viewcontrollers and MVC pattern in iOS -


    I have often seen that all instances are being posted on the Internet, in which a view in the root view The view is added Controller inside a lifecycle method in iOS

      - (zero) viewDidoadload [[Super Viewedload]; // slider 1 slider = [[DCSlider alloc] initWithDelegate: self]]; Slider.tag = 0; Slider.frame = CGRactam (0,0,20,100); [Slider addTarget: Self-action: @Selector (control based change) control events: UI ControlAventWalls]; [Self. Slider Container Ad Sueview: Slider]; // Slider 2 slider 2 = [[[DCSlider alloc] initWithDelegate: self]]; Slider2.tag = 1; Slider 2 Frame = CGRactam (0,0,20,100); [Slider 2adress: Action by itself: @sillector (control beet value change change) Control events: UI ControlAventWalls]; [Self. Slider Container 2 Adsview: Slider 2]; }  

    But, can not it break the MVC pattern?

    Because, according to my understanding, ViewControllers are considered to be only controllers and should not participate in direct visual modification activities. Is there a way to create code in different blocks of view and controllers?

    good question

    And no, it does not break the MVC pattern.

    Controller "management" ideas, which can certainly be many; They can manipulate data to present through ideas; They can manipulate the position of ideas they manage; Or they can create ideas that are presented to themselves - including the "management" instrument. In this definition, I think it is safe to say that the controller will include visual modification without breaking the MVC pattern directly. should do.

    addSubview: The method inside the controller is OK! The controller has the view "Management" under it, by adding a subview that is managed by the same controller.

    Of course, if a visual hierarchy is complex and if many considerations are doing a specific task different from the controller, which you think can be modular, then you can give them your controller and They can add hair control without breaking any pattern.


    java - Modify Applets to Support 2nd Environment -


    I feel as obscure as I can be - and please understand that this is due to my limited knowledge. Simply put, I do not even know what to share in my moments to clarify my problem at this moment.

    Tell me what I am feeling and what needs to be done as follows:

    First of all, there were adex services running in the Youth environment. Now, the Ut2 environment is needed, so I was tasked to modify the build file to generate two wars - Edox. And edocs2.war (respectively for Ut and UAT 2). I was able to generate two wars from the same build file. Now, I need to "modify applet to support" 2. I believe that I need to modify the current path (?) In the applet so that they can run in their environment (UAT and UAT 2), but I did not understand that the code related to the applet for supporting two environments How to modify it. / P>

    I hope I was able to describe my problem. help !!


    iterate json into bash variable -


    If I have a json string in a bass script, then how can I convert it to an array?

     {"name": "foo", "id": "123"} {"name": "bar", "id": "456"}  

    Do I want to be prompted on the w / name, and she will tell me which ID (in one variable) I need to use

    something like

      Raise your poison: 1) Foo 2) times #?  

    If I select 1, then id 123 goes to the variable X, and if I select 2, then id 456 <

    There is a better way to read data in an Associated Array For - here, using for parsing.

      declared - a data = () while the IFS = read -r id name; Data is named [$ id] = $ & lt; & Lt; (Jq -r '@text' \ (. Id) \ (.nim) "'< 

    Given this, you Then you can handle your menu:

      echo "Choose your poison:" "$ {! Data [=]} "for ID in; name = $ {data [$ id]} printf '% d)% s \ n'" $ id "" $ name "read -p ''? 'Selection resonant' user Selected $ {data [$ selection]} " 

    java - Hadoop Map Reduce Query -


    I try to use HADOOP MadReduce to calculate the weight of the incoming edges for each node in the graph having had. The input is in a .tsv format and looks like:

    src tgt weight

    x 102 1

    X 200 1

    X 123 5

    Y245 1

    Y 101 1

    Z-992

    X 145 3

    Y 24 1

    a 21 5

    . .

    .

    Expected output is:

    src sUM (weight)

    x 10

    Y3

    Z 2

    A5

    I have used WordCount as an example code reference from Hadop (), I tried to manipulate the code, but all my efforts ended in vain.

    I am very new to Java and Horoscope. I have shared my code, please help me understand what is wrong with the code.

    Thank you.

    Code:

      import java.io.IOException; Import java.util. *; Import org.apache.hadoop.fs.Path; Import org.apache.hadoop.conf *; Import org.apache.hadoop.io *; Import org.apache.hadoop.mapred *; Import org.apache.hadoop.util *; Public Class Task1 {MapReduceBase implements MapReduceBase in public static class map & lt; LongwayText, Text, Text, IntWritable & gt; {Private Final Static IntWritable value_parsed = New IntWritable (); Private text word = new text (); Public Zero map throws IOException (long-term appropriate key, text value, output calculator & lt; text, intWritable & gt; output, reporter reporter) {string line = value. Tutorial (); StringTokenizer Tokenizer = New StringTokenizer (line); Text key = new text (); Int sum; While (tokenizer.hasMoreTokens ()) {tokenizer.nextToken (); Keys.set (tokenizer.nextToken ()); Sum = Integer.parseInt (tokenizer.nextToken ()); Output.collect (keys, new intwritable (sum)); }}} Expand declines in public static class MapReduceBase applies Reducer & lt; Text, IntWritable, Text, IntWritable & gt; {Public Zero Low (Text Key, Iterator & quot; IntWritable> Price, OutputClalter & lt; Text, IntWritable> Output, Reporter Reporter) throws IOException {int sum = 0; While (values.hasNext ()) {sum + = values.next (). Get (); } Output.collect (key, new IntWritable (sum)); }} Public static zero principal (string [] args) throws exception {JobConf conf = new JobConf (Task1.class); Conf.setJobName ("Task1"); Conf.setOutputKeyClass (Text.class); Conf.setOutputValueClass (IntWritable.class); Conf.setMapperClass (Map.class); Conf.setCombinerClass (Reduce.class); Conf.setReducerClass (Reduce.class); Conf.setInputFormat (TextInputFormat.class); Conf.setOutputFormat (TextOutputFormat.class); FileInputFormat.setInputPaths (conf, new path (args [0])); FileOutputFormat.setOutputPath (conf, new path (args [1])); JobClient.runJob (conf); }}  

    You have to change your code a little bit.

      while (tokenizer.hasMoreTokens ()) {tokenizer.nextToken (); // This value is the first column keys. Set (tokenizer.nextToken ()); // This is incorrect - you do not have to // set the first column as the key // second column sum = integer. Print (token effect.exxton ()); // here // third column output.collect (key, new intwritable (sum)); }  

    Hope this can help you