Search Results

Search found 240 results on 10 pages for 'kim jong woo'.

Page 6/10 | < Previous Page | 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to call regular JS function with params within jQuery ?

    - by Kim
    Is there another way to run a regular JS function with params passed than what I use below ? It seems redundant use a on-the-way function to do this. function regularJSfunc(param1,param2) { // do stuff } $(document).ready(function(){ $('#myId').change(function(){ regularJSfunc('data1','data2'); }); } Using a .bind event seems much better, however I am not sure how to access the params. Note: Example below doesnt work. $(document).ready(function(){ $('#myId').bind('change',{'data1','data2'},regularJSfunc); }

    Read the article

  • Extending an entity

    - by Kim L
    I have class named AbstractUser, which is annotated with @MappedSuperclass. Then I have a class named User (@Entity) which extends AbstractUser. Both of these exist in a package named foo.bar.framework. When I use these two classes, everything works just fine. But now I've imported a jar containing these files to another project. I'd like to reuse the User class and expand it with a few additional fields. I thought that @Entity public class User extends foo.bar.framework.User would do the trick, but I found out that this implementation of the User only inherits the fields from AbstractUser, but nothing from foo.bar.framework.User. The question is, how can I get my second User class to inherit all the fields from the first User entity class? Both User class implementation have different table names defined with @Table(name = "name").

    Read the article

  • issue about Concept of JFrame, JLabel and ContentPane

    - by Sun Hong Kim
    I just study window programming with awt. I see through several codes but I can not get concepts of JFrame, JLabel and ContentPane. I think JFrame only make outer Frame. ContentPane is container that contain JLabel that has contents(text, button, radio etc...). I don't know this is correct T.T Why I ask this is I failed combine the contents. I can not make TextField and InternalFrame at a time. I want to know the concept. I hope you take my question right.

    Read the article

  • using an array in a custom formula in crystal reports xi

    - by Kim Sharpe
    I have a formula which is working; the formula uses an array. I tried to extract the formula to create a custom formula but now get an error in the syntax. I am wondering if the array is causing the problem as the error is on the line: last_element_current:=val(sc_array[1]) + 1; and the error is: the ) is missing and highlights the variable sc_array before the index [1].

    Read the article

  • How to show jQuery is working/waiting/loading ?

    - by Kim
    How do I show a loading picture and/or message to the user ? If possible, would I like to know how to make it full screen with grey-dimmed background. Kinda like when viewing the large picture from some galleries (sorry, no example link). Currently do I add a CSS class which has the image and other formating, but its not working for some reason. Results from the search do get inserted into the div. HTML <div id="searchresults"></div> CSS div.loading { background-image: url('../img/loading.gif'); background-position: center; width: 80px; height: 80px; } JS $(document).ready(function(){ $('#searchform').submit(function(){ $('#searchresults').addClass('loading'); $.post('search.php', $('#'+this.id).serialize(),function(result){ $('#searchresults').html(result); }); $('#searchresults').removeClass('loading'); return false; }); });

    Read the article

  • How to return radio checked object with jQuery ?

    - by Kim
    HTML <input type="radio" name="rdName" id="uniqueID1" value="1" checked="checked"> <input type="radio" name="rdName" id="uniqueID2" value="2"> <input type="radio" name="rdName" id="uniqueID3" value="3"> jQuery #1 $('input:radio[name=rdName]:checked').val(); jQuery #2 $('input[name=rdName]:checked'); jQuery #1 gets the value of checked radio, but I need to get the whole object to get the ID. jQuery #2 get this (from Chrome Dev console). Object "0" is the actual object I need, but I am unable to just that. 0: HTMLInputElement constructor: function Object() context: HTMLDocument length: 1 prevObject: Object selector: input[name=rdName]:checked __proto__: Object Any ideas how to isolate the needed object ?

    Read the article

  • C++ cin questions

    - by Kim
    This seems to be weird: int main(int argc, char* argv[]) { cout << "function main() .." << '\n'; char ch = 0; double number_value=1.1; cin >> ch; cin.putback(ch); cin >> number_value; cout << "1 .. " << " " << cin.good() << " " << number_value << '\n'; cin >> number_value; cout << "2 .. " << " " << cin.good() << " " << number_value << '\n'; return 0; } If I input the following: 7a 1 I get the following: function main() .. 7a 1 1 .. 1 7 2 .. 0 0 I understand the: 1 .. 1 7 but why the variable number_value is 0. cin.good() shows failure so nothing would have read and the value in number_value from the previous assignment would remain. I expect the value of 7.

    Read the article

  • JSONArray does not work when I am getting the JSON string from the server

    - by Taehoon A Kim
    I've looked up some answers but am not sure why mine is failing exactly... The code looks something like this HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); String json = EntityUtils.toString(httpEntity); //Convert to JsonArray JSONArray jsonArray = new JSONArray(json); Log.i(DEBUG_TAG, Integer.toString(jsonArray.length())); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); Log.i(DEBUG_TAG, jsonObject.getString(KEY_ID)); // creating new HashMap HashMap<String, String> map = new HashMap<String, String>(); // adding each child node to HashMap key => value map.put(KEY_ID, jsonObject.getString(KEY_ID)); map.put(KEY_TITLE, jsonObject.getString(KEY_TITLE)); map.put(KEY_ARTIST, jsonObject.getString(KEY_ARTIST)); map.put(KEY_DURATION, jsonObject.getString(KEY_DURATION)); map.put(KEY_VOTECOUNT, jsonObject.getString(KEY_VOTECOUNT)); map.put(KEY_THUMB_URL, jsonObject.getString(KEY_THUMB_URL)); map.put(KEY_GENRE, jsonObject.getString(KEY_GENRE)); //Adding map to ArrayList if (Integer.parseInt(jsonObject.getString(KEY_VOTECOUNT)) == -1){ //If VoteCount is -1 then add to header headerList.add(map); }else { songsList.add(map); } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } When I run logcat on String json, it seems to show correct info which is kind of like this... { "userdata": [ { "id": "8", "title": "Baby One More Time", "artist": "Britney Spears", "duration": "03:24:00", "votes": "0", "thumb_url": "http://api.androidhive.info/music/images/dido.png", "genre": null }, { "id": "2", "title": "As Long As You Love Me", "artist": "Justin Bieber", "duration": "05:26:00", "votes": "0", "thumb_url": "http://api.androidhive.info/music/images/enrique.png", "genre": "Rock" } ] } and the logcat on JSONArray jsonArray = new JSONArray(json); tells me that jsonArray.length() 10-31 22:57:28.433: W/CustomizedListView(26945): error! Invalid index 0, size is 0 Please let me know Thank you,

    Read the article

  • Running Maven Goals in CLI.

    - by Jeeyoung Kim
    Hello, I have a maven pom.xml file with multiple instances of a same goal defined (inside with different s). I'm wondering how I can run a specific goal via maven command line. I've tried mvn --help, but I couldn't find an entry regarding this.

    Read the article

  • How to map a Dictionary<string, string> spanning several tables

    - by Kim Johansson
    I have four tables: CREATE TABLE [Languages] ( [Id] INTEGER IDENTITY(1,1) NOT NULL, [Code] NVARCHAR(10) NOT NULL, PRIMARY KEY ([Id]), UNIQUE INDEX ([Code]) ); CREATE TABLE [Words] ( [Id] INTEGER IDENTITY(1,1) NOT NULL, PRIMARY KEY ([Id]) ); CREATE TABLE [WordTranslations] ( [Id] INTEGER IDENTITY(1,1) NOT NULL, [Value] NVARCHAR(100) NOT NULL, [Word] INTEGER NOT NULL, [Language] INTEGER NOT NULL, PRIMARY KEY ([Id]), FOREIGN KEY ([Word]) REFERENCES [Words] ([Id]), FOREIGN KEY ([Language]) REFERENCES [Languages] ([Id]) ); CREATE TABLE [Categories] ( [Id] INTEGER IDENTITY(1,1) NOT NULL, [Word] INTEGER NOT NULL, PRIMARY KEY ([Id]), FOREIGN KEY ([Word]) REFERENCES [Words] ([Id]) ); So you get the name of a Category via the Word - WordTranslation - Language relations. Like this: SELECT TOP 1 wt.Value FROM [Categories] AS c LEFT JOIN [WordTranslations] AS wt ON c.Word = wt.Word WHERE wt.Language = ( SELECT TOP 1 l.Id FROM [Languages] WHERE l.[Code] = N'en-US' ) AND c.Id = 1; That would return the en-US translation of the Category with Id = 1. My question is how to map this using the following class: public class Category { public virtual int Id { get; set; } public virtual IDictionary<string, string> Translations { get; set; } } Getting the same as the SQL query above would be: Category category = session.Get<Category>(1); string name = category.Translations["en-US"]; And "name" would now contain the Category's name in en-US. Category is mapped against the Categories table. How would you do this and is it even possible?

    Read the article

  • When exactly does a method have side effects?

    - by Kim
    As I always understood it, any change to the programs state (or anything to do with IO) is a side effect. It does not matter, whether the change occurs in a global variable or in a private field of the object the method is called on. It follows that all methods which do not return anything either do nothing at all or have a side effect. My confusion comes from one of our university's instructors (who is still a student and thus not omniscient yet;) ) telling me setters don't have side effects.

    Read the article

  • Instagram API and Zend/Loader.php

    - by Jaemin Kim
    I want to use Instagram API and I found this code. <html> <head></head> <body> <h1>Popular on Instagram</h1> <?php // load Zend classes require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Http_Client'); // define consumer key and secret // available from Instagram API console $CLIENT_ID = 'YOUR-CLIENT-ID'; $CLIENT_SECRET = 'YOUR-CLIENT-SECRET'; try { // initialize client $client = new Zend_Http_Client('https://api.instagram.com/v1/media/popular'); $client->setParameterGet('client_id', $CLIENT_ID); // get popular images // transmit request and decode response $response = $client->request(); $result = json_decode($response->getBody()); // display images $data = $result->data; if (count($data) > 0) { echo '<ul>'; foreach ($data as $item) { echo '<li style="display: inline-block; padding: 25px"><a href="' . $item->link . '"><img src="' . $item->images->thumbnail->url . '" /></a> <br/>'; echo 'By: <em>' . $item->user->username . '</em> <br/>'; echo 'Date: ' . date ('d M Y h:i:s', $item->created_time) . '<br/>'; echo $item->comments->count . ' comment(s). ' . $item->likes->count . ' likes. </li>'; } echo '</ul>'; } } catch (Exception $e) { echo 'ERROR: ' . $e->getMessage() . print_r($client); exit; } ?> </body> </html> In here, I found Zender/Load.php, and I've never heard about that. Is it okay to go http://www.zend.com/en/products/guard/downloads here, and download Zend for linux?? And for another question, is this code available to use Instagram API?? For last, could you let me know that is there any simple code to use Instagram API? Thank you.

    Read the article

  • How to approach this SQL query

    - by Kim
    I have data related as follows: A table of Houses A table of Boxes (with an FK back into Houses) A table of Things_in_boxes (with an FK back to Boxes) A table of Owners (with an FK back into Houses) In a nutshell, a House has many Boxes, and each Box has many Things in it. In addition, each House has many Owners. If I know two Owners (say Peter and Paul), how can I list all the Things that are in the Boxes that are in the Houses owned by these guys? Also, I'd like to master this SQL stuff. Can anyone recommend a good book/resource? (I'm using MySQL). Thanks!

    Read the article

  • C++ STL type_traits question.

    - by Kim Sun-wu
    I was watching the latest C9 lecture and noticed something interesting.. In his introduction to type_traits, Stephan uses the following (as he says, contrived) example: template <typename T> void foo(T t, true_type) { std::cout << t << " is integral"; } template <typename T> void foo(T t, false_type) { std::cout << t << " is not integral"; } template <typename T> void bar(T t) { foo(t, typename is_integral<T>::type()); } This seems to be far more complicated than: template <typename T> void foo(T t) { if(std::is_integral<T>::value) std::cout << "integral"; else std::cout << "not integral"; } Is there something wrong with the latter way of doing it? Is his way better? Why? Thanks.

    Read the article

  • How Do I Import a 3D Object into Adobe Flex?

    - by Kim
    Hi everyone, I wanted to know if anyone here knows how to import a 3D Object (i.e. Maya 3D Model) into Adobe Flex Application? I needed to create a simple Flex application which will allow me to rotate the 3D Object by dragging but I cannot seem to start doing it because I'm having a hard time trying to figure out how I can import my 3D model into Flex. This is exactly what I wanted to do: 3D Object in Flex I hope someone can help me. Thanks a lot :)

    Read the article

  • How do you unit test the real world?

    - by Kim Sun-wu
    I'm primarily a C++ coder, and thus far, have managed without really writing tests for all of my code. I've decided this is a Bad Idea(tm), after adding new features that subtly broke old features, or, depending on how you wish to look at it, introduced some new "features" of their own. But, unit testing seems to be an extremely brittle mechanism. You can test for something in "perfect" conditions, but you don't get to see how your code performs when stuff breaks. A for instance is a crawler, let's say it crawls a few specific sites, for data X. Do you simply save sample pages, test against those, and hope that the sites never change? This would work fine as regression tests, but, what sort of tests would you write to constantly check those sites live and let you know when the application isn't doing it's job because the site changed something, that now causes your application to crash? Wouldn't you want your test suite to monitor the intent of the code? The above example is a bit contrived, and something I haven't run into (in case you haven't guessed). Let me pick something I have, though. How do you test an application will do its job in the face of a degraded network stack? That is, say you have a moderate amount of packet loss, for one reason or the other, and you have a function DoSomethingOverTheNetwork() which is supposed to degrade gracefully when the stack isn't performing as it's supposed to; but does it? The developer tests it personally by purposely setting up a gateway that drops packets to simulate a bad network when he first writes it. A few months later, someone checks in some code that modifies something subtly, so the degradation isn't detected in time, or, the application doesn't even recognize the degradation, this is never caught, because you can't run real world tests like this using unit tests, can you? Further, how about file corruption? Let's say you're storing a list of servers in a file, and the checksum looks okay, but the data isn't really. You want the code to handle that, you write some code that you think does that. How do you test that it does exactly that for the life of the application? Can you? Hence, brittleness. Unit tests seem to test the code only in perfect conditions(and this is promoted, with mock objects and such), not what they'll face in the wild. Don't get me wrong, I think unit tests are great, but a test suite composed only of them seems to be a smart way to introduce subtle bugs in your code while feeling overconfident about it's reliability. How do I address the above situations? If unit tests aren't the answer, what is? Thanks!

    Read the article

  • Store form values for later submission

    - by kim griggs
    I have a Rails app that lets users create tutorials and quizzes. There are many users taking the quizzes and many quizzes in a tutorial. My client wants the quiz results to persist when a student navigates away from the quiz. So the use case would be: User starts to take quiz User answers some of the questions User navigates away from quiz to check a fact in the tutorial User goes back to quiz and their answers are still there User finishes quiz and submits Now this would be pretty easy to do if I enforced a "Save" submit so that the answers could be stored in a session or whatever, but the client (and I agree) thinks people will not remember to save before navigating away. Looking for advice on how to approach this. I'm thinking an observer and cookies.

    Read the article

  • Windows XP: RegSvr32 /i:[cmdline]: What exactly is "Command line" in this case?

    - by Kim
    I am trying to register a dll using regsvr32 in a cmd window. I do this on an administrator account, but I need this dll to be registered for all the users. Turns out regsvr32 does not do that, it only registers for your current user. Well, when you use it this way anyways: "regsvr32 /i "C:\MyDll.dll"" What happens; The entry is added to Local_User, and Classes in the registry, but not Local_Machine. The msdn article on regsvr32 says it also takes a [cmdline] when using the /i option. But the article fails to specify what I can put in place of [cmdline]. Google is refusing to help me as well, so I'm a bit stuck on this. I realize this is not exactly on the topic of programming, but this is something programmers might know, so... Has anyone run into this before? Perhaps someone knows how this [cmdline] tag works? Are there any other ways to add this dll to all users? (Apart from editing the registry manually that is.) Any insight would be greatly appreciated!

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10  | Next Page >