w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Is there a reason for why there are no shell apps for modern ui?
Just fire up the "Ancient" desktop and the Command Prompt and Power Shell are still there. If you really wanted to I suppose you could create a "Modern" app which invoked old style DOS and PowerShell commands in the background. But the sort of user who would be interested in raw shell commands would go straight to the Old Style desktop anyway.

Categories : Windows

Manipulating a disabled attribute in client side; does JSF test properly if component is disabled?
But I could manipulate the disabled attribute from input method on the client and then post the manipulated values. Yes, the enduser could. Does the server make test if the component is disabled and rejects the changes ? Yes, JSF does it based on component tree state, not on the submitted value. So that part is safe. It does that by the way also for readonly and rendered attribtues. See also: Why does JSF need to save the state of UI components on the server side? Which properties in a JSF backing bean can be set by a user? h:commandLink / h:commandButton is not being invoked (point 5)

Categories : Security

In JavaFX 2.2, is it possible to make a parent disabled, yet let his children remain not disabled?
Until I have a real solution (disable the parent and not the child), I've found a work around. Simply make the titled pane forward his focus to the button! Given that the lower TitledPane with his title "Send" has a fx:id of "titledPaneSend", and that the Button have a fx:id "button", and that the controller class implements Initializable, add this code to the initialize method: titledPaneSend.focusedProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean from, Boolean to) { if (to == true) /* * Just calling button.requestFocus() will make * BOTH the TitledPane and the Button becom

Categories : Java

Disabled Fields - Still Pass though non-disabled data - CAKEPHP 2
Disabled fields do not pass thru POST , you are doing: $('.adminOnlyField').attr("readonly","true"); which makes it readonly, and it can pass thru POST, but at end you disable the same field again by doing: $('.adminOnlyField').prop('disabled', 'disabled'); this line makes it disabled due to which it does not get POST'ed. So if you want to make it pass thru POST, make it readonly, and remove the following line: $('.adminOnlyField').prop('disabled', 'disabled');

Categories : Javascript

Watin: Determine if Link has disabled="disabled" attribute
WatiN automatically resolve the disabled attribute to determine if the control is enable or not. So you can use the Enabled property : var disabledLink = browser.Link( l => l.Id == "ButtonNext" && !l.Enabled); Note that if you want to get any attribute value of a control, you can use the GetAttributeValue(string attributeName) method. For the disabled attribute, WatiN convert the value to a boolean. This code is equivalent to the previous one : var disabledLinkTrue = browser.Link( l => l.Id == "ButtonNext" && l.GetAttributeValue("disabled") == Boolean.TrueString);

Categories : Misc

Using :disabled in CSS disabled button style b0rks IE8
IE8 ignores the rule, since it doesn't understand :disabled. A little research goes a long way: How do you style disabled textarea in IE8?

Categories : HTML

How to import a modern.ie vm into Hyper-V
Don't select the Virtual Machines directory - go back one level. The folder you want should contain a file called config.xml. Alternately, forget about importing the VM configuration. You can create a new VM and just attach the VHD file to it.

Categories : Misc

How To Make Window Look More Modern
The manifest file must be incorporated as a resource in your executable. That's something VS does almost automatically for you; it is possible to do with MinGW too, it's just a little more convoluted. Take a look at this tutorial, in the section "Enabling Visual Styles". Although the tutorial shows a winxp look, don't worry; once visual styles are enabled, they'll show up as the native theme of your machine.

Categories : C++

ASLR and NX-bit in modern Windows?
Usually exploits involve a ROP attack. The ROP attack might directly invoke some system call (e.g., to spawn a shell), or might invoke VirtualProtect() to disable the NX bit. Often one step in the ROP attack is to find at least some code at a predictable location (say, a DLL that didn't opt into ASLR) or to find an information disclosure vulnerability that lets the attacker predict the location of some code, so the attacker can find gadgets at a predictable address. Once the attacker has the ability to execute arbitrary gadgets, usually it is game over: for instance, the exploit code can derandomize the address of all other functions, such as VirtualProtect(), and then call it. See also http://security.stackexchange.com/q/20497/971

Categories : Windows

Is there any modern use for the bell character (a)
Back in the dark ages when ASCII was codified out of the ashes of BAUDOT, a terminal was a large chunk of iron that hammered ink onto paper, often included a paper tape punch and reader, and interpreted keystrokes to generate an asynchronous serial signal at a few hundred baud with spinning wheels and relays. In case an operator fell asleep to the soothing noises of it hammering out text, it had an actual bell it could ring. The character coded 007 in octal, 0x07 in hex, or as a in a C character or string constant rang the bell when received. As terminals became smaller and implemented with few or no moving parts, the physical bell was replaced by a beeper. Exactly what your terminal emulator (aka a Console Window in Windows, xterm or something similar in Unix) does when it is asked to

Categories : Java

SMO Restoring Took Forever
You have the following line in your code: restoreDB.NoRecovery = true; Hence the database will stay showing as restoring in SSMS forever until you run RESTORE DATABASE [sample] WITH RECOVERY Or its SMO equivalent, I'm not sure exactly what that would be.

Categories : C#

Why won't my custom Modern UI style apply?
first of i suggest you that you should try to do all of your style work in your xaml file like try to declare custum styles in your xaml page. if you want to use the custumstyle in particularpage only then define it your page only like this. and you can apply this style on any button. <Page x:Class="Appgridcheck.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Appgridcheck" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Page.Resources> <Style TargetType="Button" x:Name="CustomStyle" > <Setter Property="Background" Value="White" /> </Style>

Categories : C#

What's the modern C# way to start two threads and then wait for them to end?
With tasks: var t1 = Task.Factory.StartNew(() => extracter.Start(), TaskCreationOptions.LongRunning); var t2 = Task.Factory.StartNew(() => loader.Start(), TaskCreationOptions.LongRunning); // some arbitrary amount of code here that's executed on the main thread. // Wait for both threads to complete before continuing. t1.Wait(); t2.Wait(); // Code here cannot execute until the loader and extractor are finished. Tasks have many features that make them easier to work with than explicitly managing threads, including supporting cancellation, continuations, etc. Well worth looking into.

Categories : C#

Modern AJAX Webapp Paradigm
You have a couple of options. If you have requirements that keep you from migrating away from ASP Classic, then you may want to look at integrating one of the (still) existing frameworks/libraries that make ASP/VBScript a more manageable development environment. Here are three that I have links to at the moment, I know there are 2 or 3 others (that I'm aware of) but I can't recall where to find them... ASP Xtreme Evolution ClASPpdev ASP-Ajaxed (full disclosure, I recently took over this project) If you can move to another language/framework, you may still want to use one of the libraries above to help build some of the glue that ties the old code to the new (ASP-Ajaxed has a class for emitting JSON). I'd be wary of rapidly changing/upgrading your code base only because you never kn

Categories : Java

Protected variables with modern objective-C?
Your best option is to use a category in a second header file, e.g. MyClass_protected.h, and include it in the main class and subclasses, as suggested in the solution you link. It's really quite straightforward, not "overcomplicated" at all, just one additional file. Objective-C has very strong introspection characteristics. No matter how or where you declare a property (or any other function, for that matter), you can access it from anywhere. You will get a compiler warning unless the code you're writing can see the corresponding declaration or implementation (unless you use an introspective method like one of the performSelector... family). The only reasons for the interface are name-safety, type-safety, and preventing compiler warnings. Therefore, you have a few options: The main clas

Categories : Objective C

"Modern" OpenGL on Linux with GLFW
It seems Nicol Bolas' first comment was correct, GLFW doesn't include a GL function loader. I've got it working by using glLoadGen. It also seems to be necessary to call glfwMakeContextCurrent before ogl_LoadFunctions even if you haven't yet started any threads.

Categories : Linux

Performance of GL_POINTS on modern hardware
2x fps increase on You lose 98% of picture and get only 2x fps increase. That's not impressive. If you take into account that you should be able to easily render 300..500 fps on any decent hardware (with vsync disabled and minor optimizations), that's probably not worth it. Is there any difference in performance between drawing a scene with full triangles (GL_TRIANGLES) instead of just drawing their vertices (GL_POINTS), on modern hardware? Well, if your scene has a LOT of alpha-blending and very "heavy" pixel shaders, then, obviously, displaying scene as point cloud will speed things up, because there's less pixels to fill. On other hand, this kind of "optimization" will be completely useless for any practical task. I mean, if you're using blending and shaders, you probably w

Categories : Opengl

Restoring windows in wxpython
I'm not sure what you're doing wrong without a small runnable example. However, I created the following simple script that works for me: import wx ######################################################################## class MyPanel(wx.Panel): """""" #---------------------------------------------------------------------- def __init__(self, parent): """Constructor""" wx.Panel.__init__(self, parent) ######################################################################## class MyFrame(wx.Frame): """""" #---------------------------------------------------------------------- def __init__(self): """Constructor""" wx.Frame.__init__(self, parent=None, title="Test") panel = MyPanel(self) self.timer = wx.Timer(self)

Categories : Python

Trouble restoring database using T-sql
No, the second code is not identical. After move it says 'Clinical_Data' not 'Clinical_Data_Extension' .That is crucial. It is the Logical Name of the data container inside the backup. USE master GO RESTORE FILELISTONLY FROM disk='c:Clinical_Data_Extension_full.bak' gives You the precise Logical Names. Logical Names and Database Names do not need to be of the same convention. The Logical Name for the data container in 'Clinical_Data_Extension_full.bak' could be 'Clinical_Data' as in the other backup. The error states that Your specified Logical Name is not present in 'c:Clinical_Data_Extension_full.bak'. The same mixup can happen with the log container.

Categories : SQL

Restoring icloud data to app
The document already exists where you want it. You just need to do the right thing to access it. Use the URL that you get from your code, but don't include the last part with @"filename." Pass the url to this method on the file manager: (NSArray *)contentsOfDirectoryAtURL:(NSURL *)url includingPropertiesForKeys:(NSArray )keys options:(NSDirectoryEnumerationOptions)mask error:(NSError *)error The NSArray contains NSURL objects which point to the files and folders in that directory. Use the URL of the file that you want and open it as appropriate. For more info, see the NSFileManager documentation.

Categories : IOS

jQuery .scrollHeight is not restoring
Change your "height: auto" by 80px $('#navContainer').hover(function(){ $(this).animate({ height: $(this)[0].scrollHeight+'px' }, 400); }, function(){ $(this).animate({ height: '80px' }, 400); });

Categories : Jquery

Restoring SQLite DB file
Please use this code it may help you... I have done the same with this way For Backup try { File sd = Environment.getExternalStorageDirectory(); File data = Environment.getDataDirectory(); if (sd.canWrite()) { String currentDBPath = "//data//package name//databases//database_name"; String backupDBPath = "database_name"; File currentDB = new File(data, currentDBPath); File backupDB = new File(sd, backupDBPath); if (currentDB.exists()) { FileChannel src = new FileInputStream(currentDB).getChannel(); FileChannel dst = new FileOutputStream(backupDB).getChannel(); dst.transferFrom(src, 0, src.size()); src.close(); dst.close(); Toast.makeText(getApplicationContext(), "B

Categories : Android

Restoring In App Purchases for iOS using Unity
Are you using some kind of plugin for StoreKit? There is a really nice plugin by Prime31 which provides this behavior: public static void restoreCompletedTransactions(); You can visit their website for more information http://prime31.com/docs#iosStoreKit

Categories : IOS

Error restoring Postgresql db
I think you have used custom format and the backup is sent to normal text file. For restoring from text files, use psql command: psql -e -d template1 -f "C:UsersmchanDesktopMyDBDBBackup.backup" Refer to this post on Postgresql's Community page. Use the psql command as follows: psql -e -U username -d databaseName -f "C:UsersmchanDesktopMyDBDBBackup.backup" Username should be a role defined in the database. Ex: postgres If the psql command prompts for a password and you don't know the password for the user, replace "md5" with "trust" in pg_hba.conf file under "/data" folder and restart "postgres service" for this change to take effect. Once this change is done psql will not prompt for the password. For more documentation on psql and additional options , refer to psql-doc.

Categories : Database

Why is JFormattedTextField restoring previous value?
That thing happen cause JFormattedTextField allows configuring what action should be taken when focus is lost. These are the actions. Description JFormattedTextField.REVERT - Revert the display to match that of getValue, possibly losing the current edit. JFormattedTextField.COMMIT - Commits the current value. If the value being edited isn't considered a legal value by the AbstractFormatter that is, a ParseException is thrown, then the value will not change, and then edited value will persist. JFormattedTextField.COMMIT_OR_REVERT - Similar to COMMIT, but if the value isn't legal, behave like REVERT. JFormattedTextField.PERSIST - Do nothing, don't obtain a new AbstractFormatter, and don't update the value. The default is JFormattedTextField.COMMIT_OR_REVERT so

Categories : Java

Restoring CSS value after jQuery toggle
I can see that your original background color is in the CSS files, so you can simply do this : $("#billboardButton").css("backgroundColor", $(this).is(':not(:visible)') ? "#333" : ""); See the result : http://jsbin.com/ahatin/1

Categories : Jquery

:after pseudo not working in all modern browsers except Chrome
That's because you aren't supposed to use pseudo-elements on replaced content as its content isn't defined by CSS, but rather the OS in most cases (for form elements). I would imagine the implementations would vary amongst browsers because of this. From the Generated and Replaced Content Module: Replaced elements do not have '::before' and '::after' pseudo-elements; the 'content' property in the case of replaced content replaces the entire contents of the element's box.

Categories : HTML

Drupal deployment of content modern techniques
If you want to do it once use normal deploying methods. Transfer files, copy database and change your settings.php file as also as other files you may have edit (robots.txt, .htaccess etc) except if you have the same server configuration for each site. If you want to do it on rare times, eg once per year use backup & migrate and its complementary modules. Finally if you want to deploy between different environments of the site on a regular basis (eg when there are security updates) use Drush and drush aliases. See Using drush to synchronize and deploy sites for more details.

Categories : PHP

What is the proper way to hash passwords in modern objective c?
I would avoid doing your own hashing and store them in the Keychain for security. UPDATE There are probably many ways to do this, but the way I have sent info securely over the net is to simply use the https protocol. See this question, answer and discussion. As an aside, why even do this at all? The OAuth protocol has been invented for this purpose, and is fairly easy to setup.

Categories : IOS

CSS media queries for modern mobile browsers
There is no way to make everyone happy. For our upcoming responsive website we used a few breakpoints 768px 1024px 1280px 1920px - is our biggest, we cut off at this point We have our server output classes on the body to detect classes (can be done with modernizr I think, never used it), for example, .iphone, android, .mobile, .phone, .tablet So if you are using an iphone we would get .iphone and .phone on the body tag For some pages we also defined breakpoints at 320px and 480px We use jquery for everything, just a warning, jquery runs fairly slow on Samsung tablets, man do we hate that device Example of media query (we use LESS) // normal styles @media only screen and (max-width: @maxTabletWidth) { // less than 1024px styles, yes I know 1280px is also tablet } @media only sc

Categories : CSS

Drawing round points using modern OpenGL
Drawing circle with shader. OpenGL ES shader sphere.

Categories : Opengl

Memory manipulation: set every n-th bit (C/C++) in modern CPUs/GPUs
First of all, doing this for huge chunks of memory is going to be bottlenecked by cache misses. Current CPUs can do quite a few instructions per load/store and still max out memory bandwidth. The problem is much more interesting if we're talking about a few k of memory that's already in L1 cache. If you're setting every 721st bit, vector stuff won't help you. Your stride is 90.125 bytes, which is bigger than even AVX512 vectors. So the optimal solution is to do a single byte OR at the appropriate address. Writing the loop to keep track of the bit-position within the byte, and the byte position, is non trivial. If it's a compile-time constant stride, unrolling by 8 would make it easy. (An extra increment of one byte every 8th OR.) ; pointer in rdi ; loop counter in ecx .loop: o

Categories : C

Is there no known way to get visited links with jQuery in modern browsers?
No. (If there is, it's a security bug and probably won't exist for long.) If all you care about is styling, you should be able to achieve it through CSS, but through what is displayed on screen should be the only way to observe it being visited.

Categories : Javascript

How to compile C code using old syntax with a modern compiler?
You can just disable that warning since you don't care about it: -Wno-implicit-int Also, are you sure you're using llvm-gcc? When I made a test with your example, I had to add -Wall to get gcc to say: $ gcc -Wall -c -o example.o example.c example.c:8: warning: return type defaults to ‘int’ But clang said: $ clang -c -o example.o example.c example.c:8:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] compare_ind(u, v) int *u, *v; {return pt[*u].y <= pt[*v].y ? -1 : 1;} ^~~~~~~~~~~ 1 warning generated. without any flags at all, and that message more closely matches the warning in your question. On my machine: $ gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Fr

Categories : C

Caliburn.Micro + MEF + Modern UI: IContent events
Ok this wasn't so bad in the end - it certainly makes life a bit easier in trying to get the events to be passed across to the VM I created a conductor for the ModernFrame control that exists in the ModernWindow controls template You need to create an instance of the conductor in the OnViewLoaded event of the VM for your ModernWindow as this seems to be the best place (i.e. no navigation has happened yet but the control has fully loaded and has resolved it's template) // Example viewmodel: public class ModernWindowViewModel : Conductor<IScreen>.Collection.OneActive { protected override void OnViewLoaded(object view) { base.OnViewLoaded(view); // Instantiate a new navigation conductor for this window new FrameNavigationConductor(this); } } Th

Categories : C#

What "modern" browsers does jScrollPane work consistently with?
I've used jScrollpane for at least 3-4 years now and from experience I can tell you that jscrollpane works perfectly in Internet Explorer 7 through 10 Since Firefox 2 or 3 Chrome pretty much since the beginning Safari (can't confirm which version but it worked 3-4 years ago so it's compatible with old versions) In Webkit browsers CSS must be included before Javascript. As for mobile, I can confirm that it works in iOS but sometimes the scrolling mechanism takes a couple of taps to activate. Didn't have the chance to test on Android. Hope this helps.

Categories : Jquery

Restoring div content on mouseout after click
I added onmouseout="changeContentBack1()" to your link on your code pen and it works fine. http://cdpn.io/ciHek http://codepen.io/anon/pen/ciHek On a side note you might want to clean up your HTML and validate it. I'm seeing a lot of missing or out of place tags.

Categories : Javascript

Restoring Wordpress's delete MAMP
Assuming that the files are not in the Trash can, there are a few utilities available that may be of some assistance. This article covers two of the most popular http://www.cultofmac.com/67472/how-to-undelete-files-in-mac-os-x-macrx/ In the event the link dies, the two recommended utilities are SubRosaSoft FileSalvage Prosoft Data Rescue Good luck!

Categories : Wordpress

Android prevent restoring the activity
I had a problem just like this. Here's how I fixed it: @Override protected void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.clear(); } Note that this method will ensure that absolutely no UI state information will be stored when the Activity is killed by the system - this has the effect of also not restoring any Views when onRestoreInstanceState() gets called with the same Bundle after onStart().

Categories : Android

Restoring SQL Server database using just the MDF file without LDF
You can try attaching the MDF by right clicking on databases in SSMS, and deleting the reference to the log file location in that dialog, and a new one will be created, assuming the MDF is not corrupt.

Categories : SQL



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