w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Insertion happened when update the record
Issue:- Insertion is happening because on update everytime you are creating a new Instance of your UserEntity entity and not setting its Id or the primary key. so on saving hibernate thinks that entity is new and new id gets generated everytime causing insertion Solution:- To correct that add below line in your mapUserEntity() method userEntity.setId(user.getId()); so your mapUserEntity() will look like public static UserEntity mapUserEntity(CLRPUser user) { UserEntity userEntity = new UserEntity(); userEntity.setId(user.getId());//Note:-added this line userEntity.setEmailAddress(user.getEmailAddress()); userEntity.setFirstName(user.getFirstName()); userEntity.setLastName(user.getLastName()); ... }

Categories : Hibernate

What Happened to Mono 2.11.X?
Everything I have seen on their list is that the last stable release is the 2.10.x, they will be maintaining it for about 6 months and are encouraging everyone to use the 3.0 branch even though it is still stated as beta. http://www.mono-project.com/Release_Notes_Mono_3.0 From above link: Mono 3.0 is an update to Mono 2.10 based on the master branch of github, it is not a minor upgrade to 2.10. Mono 3.0 was released on October 18th 2012. We will continue to bug fix and update Mono 2.10 for another six months for users that can not upgrade to Mono 3.0. New Microsoft Open Source Stacks We now include the following assemblies as part of Mono from Microsoft's ASP.NET WebStack: System.Net.Http.Formatting.dll System.Web.Http.dll System.Web.Razor.dll System.Web.We

Categories : C#

What happened to BasePagingLoadResult in gxt 3.x?
The interface is already implemented in PagingLoadResultBean (A ListLoadResultBean that adds support for paging properties as described by PagingLoadResult.): For example: @Override public PagingLoadResult<Data> getMyData(PagingLoadConfig loadConfig) { ArrayList<Data> dataList; dataList = obtainDataMethod(); //Your method to obtain your list of data return new PagingLoadResultBean<Data>(dataList, loadConfig.getOffset(), loadConfig.getLimit()); }

Categories : Java

Why did happened warning?
You have declared your NSInteger instance variables as pointers, which they shouldn't be (they are not objects): @interface apd : NSObject { NSInteger *newyear; NSInteger *newmonth; } ... @end (or you've done this via @propertys): @property (assign, nonatomic) NSInteger *newyear; @property (assign, nonatomic) NSInteger *newmonth; Just change them to plain NSInteger.

Categories : IOS

What happened with Ruby 1.9.2?
If you're talking about updates to deal with CVE-2013-4073, then Ruby-lang.org says: All users are recommended to upgrade to Ruby 2.0.0-p247, 1.9.3-p448 or 1.8.7-p374. Presumably, anyone using MRI Ruby 1.9.2 is able to use MRI Ruby 1.9.3.

Categories : Ruby

first_or_initialize bug or what happened
you shouldn't have those commas there UserToken.where(:user_id=>2).first_or_initialize.tap do |user| user.token = 'token' user.type_id = 0 user.user_id = 2 user.save! end or with semicolon line enders: UserToken.where(:user_id=>2).first_or_initialize.tap do |user| user.token = 'token'; user.type_id = 0; user.user_id = 2; user.save!; end The way you have it you're passing the other two assignments to user.token. What you did ends up like this because ruby expression always have a return value and variables always return themselves: user.token = 'token', 0, 2

Categories : Ruby On Rails

What exactly happened with the Lisp REPL on JPL's DS-1?
Whereas most programs are built and distributed as an executable that contains only the necessary components to run the program, Lisp can be distributed as an image that contains not just the components for the specific program, but also much or all of the Lisp runtime and development environment. The REPL is the quintessential mechanism for providing interactive access to a running Lisp environment. The two key components of the REPL, Read, and Eval, expose much of the Lisp runtime system. For example, many Lisp systems today implement Eval by compiling the provided form (that is read by the Reader), compiling the form to machine code, and then executing the result. This is in contrast to interpreting the form. Some systems, especially in the past, contained both an interpreter that exec

Categories : Misc

What happened to nav-header class?
Regarding LESS files and Github project, nav-list and nav-header has never existed in Bootstrap 3. I guess it has been forgotten. You can get a similar behavior using this kind of hack: ul { width: 300px; margin: 20px; } .nav > li.nav-header > a { cursor: default; font-size: 12px; font-weight: bold; text-transform: uppercase; } <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/> <ul class="nav nav-pills nav-stacked"> <li class="nav-header"><a>Group A</a></li> <li><a href="/items/1">Item 1</a></li> <li><a href="/items/2">Item 2</a></li> <li><a href="/items/3">Item 3</a></li> <

Categories : Twitter

What happened to windowContentOverlay in Android API 18?
This is officially a bug and will be fixed for next platform release: https://code.google.com/p/android/issues/detail?id=58280 UPDATE: This seems to be fixed on API level 19

Categories : Android

What happened to Android Filterscript in 4.3?
FilterScript most certainly still exists. We did make a lot of doc updates for 4.3, so perhaps those sections disappeared (or got folded into more general sections). In general, you can still use the .fs suffix to denote FilterScript kernels. These should be more easily accelerated than .rs files due to the forced use of "__attribute__((kernel))". If you use this attribute to declare your kernels, your .rs files should also be easier to run on the GPU.

Categories : Android

What happened to android:layout_gravity?
What layout are you using? If your button is in a RelativeLayout, that may be your issue. You can work with LinearLayout, and use layout_gravity. Or in RelativeLayout, you can align the views as you see fit.

Categories : Android

How to find out the changes happened for all objects
Try a source control solution for SQL. I've used RedGate's SQL Source Control before, and it records a history of changes like this, including who made the change, and what was changed. http://www.red-gate.com/products/sql-development/sql-source-control/ It's a bit expensive, but it's good. I don't know if there's a way to do it (especially deletions) just with SQL itself.

Categories : Sql Server

What happened to anti-aliasing in Java 7?
Anti aliasing was indeed changed in Java7. link I have not found anyway to revert it at this time as it appears as though the actual AA code was changed in Java7. So you can blame Oracle for breaking AA. Only solution I have come across is reverting to Java6 (which is impossible on the latest verions of OSX). Wish I could be more helpful, but the only solution I could think of would be using different AA code from an open source library. I hope this helps a little.

Categories : Java

What happened when call std::map's operator[] or insert
The problem with insert is that make_pair will create a pair of the wrong type so the passed object will need a conversion to a proper pair type to be passed to insert. Actually in a former version the C++ standard mandated map::operator[] to behave as insert (thus forcing an inefficient implementation). Later the text was relaxed allowing a better implementation. Note anyway that for standard containers the elements are considered to be "values", i.e. the implementation is free to copy things around and you get no guarantees about how many copies will be made. You can see the make_pair problem by changing the code to mymap2.insert(std::pair<const Key, int>(k, 1)); Longer explanation The problem is that make_pair will create an std::pair<Key, int> value but insert s

Categories : C++

How can I find commits in which a specified change happened?
Use git log -G<search pattern>. For more info, see the second part of this article.

Categories : GIT

What has happened to this PHP CURL/SOAP script?
OK I finally got my answer, suggested by my web host. SSL version needed setting, not automatically determining by PHP: curl_setopt($ch, CURLOPT_SSLVERSION, 3); Thank you to everyone who looked and helped.

Categories : PHP

An strange error happened with Arraylist
ArrayList<PeopleModel> newList = new ArrayList<PeopleModel>(); newList = smsUtils.getPeopleList(); for(int i=0;i<newList.size();i++){ System.out.println(i); listPeople.add(newList.get(i)); // Here's the infinity problem. } You're iterating from zero to the SIZE of newList. The problem is that at every loop you're ADDING to the newList. So... The size of newList grows up to infinity, and the loop never stops.

Categories : Java

Scala API 2.10.*: Function2.andThen what happened to?
I don't understand where that example is going at all, but here's some code that compiles in scala 2.10.2. trait Cat trait Bird trait Catch trait FullTummy def `catch`(hunter: Cat, prey: Bird): Cat with Catch = ??? def eat(consumer: Cat with Catch): Cat with FullTummy = ??? val story = (`catch` _).tupled andThen (eat _) story(new Cat with Catch, new Bird {}) I had to quote catch because it's a reserved word, and tuple the Function2.

Categories : Api

What happened if the number of Reducer is more than Datanode
Reduce Tasks do not depend on Datanodes, they depend on the number of slots that are assigned to a particular node. The TaskTracker is responsible for running tasks on these slots on any node in the cluster. You can have more than 1 slot per node, so you can have more than 1 Reduce tasks running per node.

Categories : Hadoop

select columns if happened on same date
Not sure if I follow exactly, but sounds like you want to join a subquery: SELECT a.* FROM History a JOIN ( SELECT uniqueID, Date, COUNT(DISTINCT IPAddress) FROM History GROUP BY uniqueID,Date HAVING COUNT(DISTINCT IPAddress) > 1 )b ON a.uniqueID = b.uniqueID AND a.date = b.date EDIT: misread your with different IP addresses part, updated. The subquery will show you all the records that have multiple ip addresses for the same uniqueID/date, then joining that to your history table shows you all the fields for the records you're after.

Categories : SQL

Visual C++ and concurrency threads..why this happened?
It seems what you want to implement is similar to an assembly-line work in a factory where everyone does his job and toss it to the next worker till all the work is done. Please correct me if I am wrong. The idiom on each of your thread function is void dowork(){ while(noinput()){ sleep(0.01); } while(getSomeInput()){ processInput(); queueResult(); } displayAmountOfWorkDone(); } You are successful in providing mutual exclusion with your mutex. The issue with your design is that once a thread has observed his input queue to be non empty, he consumes all the work and then exits. Due to thread scheduling and to the processing time processInput(), a worker can consume his inputs at a higher rate than the worker before him can produce. For instanc

Categories : Windows

Try to print "Hello World" on webpage but something happened
You have a syntax error in your routes file on line 59. You probably forgot to add a do keyword to a block, or forgot to close a block by using an end keyword. Show us your routes file in order to debug the problem more accurately. See this line in the stack trace: load': C:/project/demo/config/routes.rb:59: syntax error, unexpected keyword_end, expecting $end

Categories : Ruby On Rails

ERROR happened while deserializing the JSON data
You should fix these issues in your code first: Properly check for errors in methods which provide a pointer to a reference to an NSError object as the last parameter, e.g.: - (BOOL) doSomething:(NSError**)error, or -(NSData*) doSomething:(NSError**)error In order test for an error correctly, you have to check the return value of the method only. Those methods indicate an error condition with a "special return value". For example, they return NO or nil - as always specified in the documentation. Only after the method indicated an error, the provided error parameter contains a meaningful value - that is, it points to an NSError object created by the method. Note that this parameter may also become none NULL when the method succeeded, in which case that has no "meaning". Web services usu

Categories : Objective C

What happened to .ToShortDateString in .NET Portable Class Library
While most of methods/properties that belong to types defined in System namespace are available in PCLs, there are some exceptions, and ToShortDateString is one of them. Below is the list of portable DateTime members. I don't know what was the reason behind the exclusion of some string conversion methods, but I guess this is due to redundancy. As cadrell0 pointed out, you can always achieve the same by using ToString with a parameter. T:System.DateTime M:System.DateTime.ToString(System.String) M:System.DateTime.op_GreaterThan(System.DateTime,System.DateTime) M:System.DateTime.ParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles) M:System.DateTime.get_Month M:System.DateTime.FromFileTimeUtc(System.Int64) M:System.DateTime.get_Date M:System.Dat

Categories : C#

Binding happened also by changing the values ​​from the keyboard
I created a behavior and in it I renewed the binding in a case of pressing the keys: public class KeysChangedBehavior : Behavior<ComboBox> { protected override void OnAttached() { this.AssociatedObject.AddHandler(ComboBox.KeyDownEvent, new RoutedEventHandler(this.OnKeysChanged)); this.AssociatedObject.AddHandler(ComboBox.KeyUpEvent, new RoutedEventHandler(this.OnKeysChanged)); } protected void OnKeysChanged(object sender, RoutedEventArgs e) { BindingExpression _binding = ((ComboBox)sender).GetBindingExpression(ComboBox.SelectedItemProperty); if (_binding != null) _binding.UpdateSource(); } } Here the combobox: <ComboBox ItemsSource="{Bind

Categories : C#

What happened to the Delphi Decision Support Components?
Just checked. Up until Delphi XE3, the MX*.pas sources for Decision Cube were in the ...sourcextab directory. These units do not depend on BDE: Mxarrays Mxconsts MXDCONST MXPBAR These units depend on the BDE: MXBUTTON MXCOMMON MXDB MXDCUBE MXDIMEDT MXDSQL MXDSSQRY MXGRAPH MXGRID MXPIVSRC MXQEDCOM MXQPARSE MXTABLES MXREG Mxstore Note of the above sources have changed since 1999. The odd thing: DBTABLES.PAS (for the BDE TTable / TQuery components) still ships with Delphi XE4.

Categories : Delphi

How should I deal with the exception which happened in a catch block?
Close the resources in a finally block, not in a catch block. try { // actual code. } catch (IOException e) { // handle exception } finally { try { in.close(); } catch (IOException e) { // handle exception } }

Categories : Java

ctypes load a dll without error message, but nothing happened
They don't show up when you use dir unless you've already accessed the function. For example: In [98]: from ctypes import cdll In [99]: libc = cdll.LoadLibrary('libc.so.6') In [100]: dir(libc) Out[100]: ['_FuncPtr', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_func_flags_', '_func_restype_', '_handle', '_name'] In [101]: libc.printf Out[101]: <_FuncPtr object at 0x65a12c0> In [102]: dir(libc) Out[102]: ['_FuncPtr', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__',

Categories : C++

Is there a practice to diagnose thread hung happened in WebSphere?
Determine PID of your WebSphere process, for example by using jps $ jps 1039 java Create a full thread dump by using jstack $ jstack 1039 Or (if you are on a UNIX system): $ kill -QUIT 1039 $ kill -3 1039 Or by using the WAS admin console Identify the thread(s) which hang (you get the name from the warning in the log file) Identify the line where the threads hang Look for race conditions, concurrent modifications in non-concurrent objects/iterators etc. Inspect deadlocks as well (they are possibly appended to the full thread dump) An example with a deadlock is here (look for threads in state BLOCKED). Related: JVM thread dump location

Categories : Java

What happened to "Always refresh from server" in IE11 developer tools?
Unfortunately I can confirm your suspicions, there is no 'Always refresh from server' feature in F12 tools in IE 11 preview as far as I can tell. There is clear browser cache button you mentioned which does nothing. Currently the only way to get fresh content from the server is to refresh IE11 with Ctrl+F5 keys combination. IE 11 is still in preview, so let's hope MS will at least fix clear browser cache button before official release.

Categories : Internet Explorer

autofac configuration for strategy factory pattern (resolve already happened)
I think you're trying too hard to avoid DI inside your code itself. There's nothing wrong with calling .Resolve off your container. I would add the following method declaration to IItem: IProcessor GetStrategy(IContainer container); Add the following implementation into ItemA: public IProcessor GetStrategy(IContainer container) { return container.Resolve<StrategyA>(); } and the following implementation into ItemB: public IProcessor GetStrategy(IContainer container) { return container.Resolve<StrategyB>(); } Finally, you change the constructor of MyServiceConsumer to: public MyServiceConsumer(IItem item, IContainer container) { this.item = item; this.processor = item.GetStrategy(container); } Change your caller to pass in the container, and away you

Categories : C#

Is there a way to trigger a callback on a Rails model only after a commit has happened for a create?
You could set a flag in before_create callback before_create :set_new_flag after_commit :queue def set_new_flag @__new_flag = true end def queue if defined? @__new_flag #queue it up remove_instance_variable(:@__new_flag) end # puts self.previous_changes end Or just inspect #previous_changes in the after_commit. The nil in id key should only be for new_records. Here's an example output of previous_changes {"name"=>[nil, "newest"], "id"=>[nil, "cBdjzQgxir45xQJ9UXGRSR"], "version_id"=>[nil, "cBdnAogxir45xQJ9UXGRSR"]}

Categories : Ruby On Rails

Yii TbTabs widget with render partials what happened with $_post request
If there are three separate forms in the tabs, they are independent of each other. You will need to use JavaScript/jQuery to post the three forms via AJAX, before refreshing/redirecting the page.

Categories : PHP

What happened to to phpMyAdmin's "display direction" dropdown list in version 4?
In the 4th phpMyAdmin there is a new settings option "Show display direction". It's responsible for enabling or disabling ability to switch display directions in a per-query-result basis. By default, this is unchecked (disabled). You can find this setting in: Settings > Main panel > Browser mode > "Show display direction".

Categories : PHP

hadoop: reduce happened between flush map output and finish spill before maps done
Combine output records=6 This says it all: the reduce function is used both as a combiner and a reducer. So what you are seeing is output from the combiner. The combiner is (sometimes) invoked when output is spilled. I think you should have added your code, at least the part in the main() to show us how your job is set up. This would make it easier to answer your questions.

Categories : Hadoop

Change image source of span, once content area slide happened
$( "#swap1 .expand" ) is a <span> They do not have src attributes. Your selector should be : $( "#swap1 .expand img" ).attr('src', 'images/plus.png')

Categories : Javascript

SQL Server wiped my table after (incorrectly) creating a new column .. what the heck happened?
An UPDATE statement can't delete rows unless there is a trigger that performs the delete afterward, and you say the table has no triggers. So it had to be the scenario I laid out for you in my comment: The rows did not get loaded properly to the new table, and the old table was dropped. Note that it is even possible for it to have looked right for you, where the rows did get loaded at one point--if the transaction was not committed, and then (for example) later when your session was terminated the transaction was automatically rolled back. The transaction could have been rolled back for other reasons, too. Also, I may have gotten the order incorrect: it may create the new table under a new name, load the rows, drop the old table, and rename the new one. In this case, you may have been

Categories : Sql Server

I changed the core file dump path to sdcard, but error happened
check the sd card mount correct or not and check also its properties about the sdcard (755), we may mount the sdcard to /mnt or something else when system boot up. method as below, in init.rc file , before below setting setrlimit 4 -1 -1 write /proc/sys/kernel/core_pattern /mnt/sdcard/core.%e.%p write /proc/sys/fs/suid_dumpable 1 do below setting: mount /dev/mmcblk0p1 /mnt/sdcard chmod 755 /mnt/sdcard. i think it should be OK.

Categories : Android

Flash AS3 stage.colorCorrectionSupport always resolves to unsupported - what happened to stage.colorCorrection?
(yeah this is an old question, but I was product manager for Flash Player 10, so I thought I'd answer) It works with window mode because Flash Player gets the rectangle in the browser and gets pretty much full control of the rendering stack and doesn't have to deal with compositing with items it doesn't know the color status of. When you switch to something like wmode transparent, you go into a pretty crazy back and forth process compositing with the rendered elements above and below it. When you go into wmode GPU, the rendering stack is largely handed over to the GPU (not surprisingly). In both cases, Flash Player loses some control of the rendering stack and at that point things like color correction aren't possible. The primary reason for this feature in Flash Player 10 was to enab

Categories : Actionscript

AS3 - MouseEvent.CLICK fires off for mouse click that happened before the listener was added
It sounds to me like the previous iteration of your game has not had the MOUSE.CLICK event listener removed. Even if the game is removed, the MOUSE.CLICK event will continue triggering whatever handler you added to it, eg; addEventListener(MOUSE.ClICK, ). When the game is removed you also need to removeEventListener(MOUSE.CLICK, ).

Categories : Actionscript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.