w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SMB/CIFS serverside implementation
You can do that from Python using Impacket smbserver implementation. An example can be found here: https://github.com/CoreSecurity/impacket/blob/master/examples/smbserver.py

Categories : C#

C - How do I move a file from a cifs mount to local hdd
In all likelihood, if you interrogate errno after rename fails, you will find that it is set to EXDEV. May I suggest that you add that information or confirm that it is EXDEV. If you are getting EXDEV, then it is because of the Linux limitation that rename() only works if oldpath and newpath are on the same mounted file system. From rename(2) EXDEV oldpath and newpath are not on the same mounted file system. (Linux permits a file system to be mounted at multiple points, but rename() does not work across different mount points, even if the same file system is mounted on both.)

Categories : C

iOS file sharing with SAMBA / CIFS protocol
If I understood you correctly you want to connect with your app files via WiFi . Basically you need to open a local server within your app. CocoaHTTPServer may be help you with this issue.

Categories : Iphone

Reading information from CIFS / SMB with an Android application
Noticing that you have followed the procedure from: http://learn-it-stuff.blogspot.com/2012/01/adding-jcifs-api-to-our-android-java.html in importing jcifs.jar for UniAddress and other jcifs apis, but for it to work : jcifs.jar must be present in <Project Name>/libs folder

Categories : Android

Apache/php cannot access remote cifs/samba share
have you tried //ip/foleder/ /mnt/name cifs username=user,password=passwd,nounix,noserverino,defaults,users,auto,gid=33,uid=33 0 0 change gid and uid to the apache user u can find it out like this: cat /etc/passwd | grep www-data

Categories : Apache

QDir hangs on accessing CIFS remote folder when disconnected
QDir uses synchronous file API. When underlying file system freezes, it freezes too. There are 2 options to avoid GUI freeze: 1. Move file operations to a separate thread. Use signal/slot connection to request the thread to perform QDir::exists call and to pass the result back into the GUI thread. If the filesystem freezes, only the background thread will be frozen. GUI will still operate. 2. Use a library that uses asynchronous file API. Any request made by this library will return control flow to your app immediately. The result will be passed to the callback function. See this question for available options.

Categories : Qt

perl based cron job won't write to mounted cifs/windows share ONLY after long inactivity
how about putting a umount -f -v /mnt/shared_drive mount -v -a into a root cron job just before your script runs. That way you don't need to sudo in your script and have the password in plain sight. -v might give you a hint on what is happening to make it stale

Categories : Perl

MVC data model Drop down list validation says id is required, how do I change to say name is required?
Add: [DisplayName("Name")] to the declaration of TypeID in your view model or change your label to: @Html.LabelFor(model => model.TypeID, "Name")

Categories : Asp Net Mvc

HTML input required attribute or ASP.NET MVC Data Annotations required decorator
Old browsers do not support HTML input require attribute. http://caniuse.com/#search=required http://www.w3schools.com/tags/att_input_required.asp

Categories : HTML

Is it possible to check required input with the HTML required attribute without actually submitting the form?
The OnClick event handler needs to run script code that checks the individual form fields for data, and then returns true only if the data is acceptable, otherwise returns false to abort the submission. Update: rather than using an OnClick event handler on the submit button, you should instead use an OnSubmit event handler on the form itself. That way, having the validation script return true/false has more meaning.

Categories : HTML

Why class required default constructor but structure dont required?
Because the default constructor of a class (reference type) is only exposed if an explicit one is not implemented (that is, it doesn't exist). A struct (value type) doesn't even need to be new'd, so to speak. You can use a variable that represents a struct without it - i.e. it won't be null, anyway (that is, it needn't exist at all).

Categories : C#

Using functions inside scripts required by NodeJS's required()
If it is not a part of module.exports then you can't. For example: web-notification.js function getURL(host, path) { ... } module.exports = exports = { getURL: getURL }; main-js.js var webnotis = require('./modules/web-notification.js'); webnotis.getURL(...);

Categories : Javascript

Is HTTP status code 426 Upgrade Required only meant signal an upgrade to a secure channel is required?
Quoting one of my previous answers: HTTP Upgrade is used to indicate a preference or requirement to switch to a different version of HTTP or to another protocol, if possible: The Upgrade general-header allows the client to specify what additional communication protocols it supports and would like to use if the server finds it appropriate to switch protocols. The server MUST use the Upgrade header field within a 101 (Switching Protocols) response to indicate which protocol(s) are being switched. Upgrade = "Upgrade" ":" 1#product For example, Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, incompatible protocol. According to the IANA regist

Categories : Http

for loop required and dynamic css required through PHP
You can get rid of the ifs by using an array: $styles = array('12,23' => 'r16', '34,45' => 'r17', ... '1516,1617' => 'r29' ); if (isset($styles["$string,$string1"])) { $style = $styles["$string,$string1"]; } You could also use this array to generate the CSS. Make the values associative arrays containing the class name and CSS, e.g. $styles = array('12,23' => array('class' => 'r16', 'css' => 'text-align: left;padding-left: 100px; border: solid 1px #CCCCCC; margin: 10px 490px 0px 285px;'), ...

Categories : PHP

Static .lib required for compiling library is also required for library users?
Looks like you want partial linking (see --relocatable flag in ld manual page). As I can see from the sources, cabal uses partial linking only libraries, compiled for ghci. From Distribution.Simple.GHC (buildLib function): whenVanillaLib False $ do (arProg, _) <- requireProgram verbosity arProgram (withPrograms lbi) Ar.createArLibArchive verbosity arProg vanillaLibFilePath staticObjectFiles whenProfLib $ do (arProg, _) <- requireProgram verbosity arProgram (withPrograms lbi) Ar.createArLibArchive verbosity arProg profileLibFilePath profObjectFiles whenGHCiLib $ do (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) Ld.combineObjectFiles verbosity ldProg ghciLibFilePath ghciObjFiles whenSharedLib False $ runGhcProg ghcSharedLinkArgs

Categories : Haskell

Why is YUI.add required when specifying YUI modules and if it is required how can non-YUI modules work?
It's important to distinguish between custom modules that utilize YUI3 features (sandboxed Y.Lang, etc) and completely external code. In the first case, the YUI.add() wrapper is always necessary, because the sandbox Y variable isn't available outside the module callback (the second argument to YUI.add()). The repetition of module configuration is unfortunately necessary in hand-written modules due to constraints within Y.Loader (where the combo-loading magic happens). Modules that employ YUI's build tools have the wrapper and metadata added automagically. With completely external code, you only need to provide the fullpath config property, and YUI will do the right thing. Internally, YUI knows when a given <script> request finishes, and associates that success with the configured m

Categories : Javascript

What's the difference between :focus:required:invalid:focus and :focus:required:invalid?
Here's what the spec says about calculating specificity: A selector's specificity is calculated as follows: count the number of ID selectors in the selector (= a) count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b) count the number of type selectors and pseudo-elements in the selector (= c) ignore the universal selector Selectors inside the negation pseudo-class are counted like any other, but the negation itself does not count as a pseudo-class. Concatenating the three numbers a-b-c (in a number system with a large base) gives the specificity. Note: Repeated occurrences of the same simple selector are allowed and do increase specificity. There's nothing written about uniqueness, so writing the pseudo

Categories : CSS

"No value given for one or more required parameters."
One or more of the paremeters are null. Check if strPay, strDel or strStatus is null or not. If any of them is null you can send empty string or SqlString.Null. If some parameter value is null that parameter doesn't get added that's why this error. cmd.Parameters.AddWithValue("@Pay", strPay==null?SqlString.Null:strPay);

Categories : C#

p:selectOneMenu value still required
This is because you are using JSTL <c:foreach> with JSF. The life cycle of JSTL vs JSF matters. JSTL is executed when the view is being built, while JSF is executed when the view is being rendered. The two do not work in synch with each other. In your case, you need to use <f:selectItems> instead of <c:foreach> Replace: <c:forEach items="#{datosInstitucion.municipios}" var="municipio"> <f:selectItem itemLabel="#{municipio.nombre}" itemValue="#{municipio.id}"/> </c:forEach> with: <f:selectItems value="#{datosInstitucion.municipios}" var="municipio" itemLabel="#{municipio.nombre}" itemValue="#{municipio.id}"/> For more reading, I suggest you to read the following answer

Categories : JSF

Url Rewrite Help required
RewriteCond %{HTTP_HOST} ^(.+).o9village.com$ RewriteRule (.*) o9_advertiser/ad_list/ad_list.php?country=%1 [L] In first line, it checks whether it's something like iran.mydomain.com or not? if yes, it goes to rewrite rule which redirect user to http://mydomain.com/o9_advertiser/ad_list/ad_list.php internally (User can not see the redirection in his/her browser). if you use var_dump function in ad_list.php to see $_GET array, you will see something like: array(2) { ["country"]=> string(4) "iran" ["path"]=> string(9) "index.php" } Edit: OK, Log into your CPanel account, create a sub-domain *.o9village.com. set Document Root to point at Document Root of your main domain o9village.com. Now, if you browse iran.o9village.com, you will see same page as http://o9villa

Categories : PHP

moving a div when required
Im not the best with math, but basically you need to find out how much your scrolling content has moved, and stop it from moving when it has moved too far up or down. I have created a similar thing to what yo umay be trying to achieve, here http://codepen.io/lukeocom/pen/nHuri I get the height of the container and the height of the content, and then check that the amount the content has scrolled minus the height of the container, is less than the height of the content. It's all very confusing to my math weak brain, but perhaps you can figure out an easier method. At any rate, my example works. You need to be careful with how much you scroll the content by, as well as how quick the animation is completed, and how often the interval is fired. I'll attempt to clean up the working code ex

Categories : Javascript

Manifest help required
<action android:name="com.mysmartftp.MainActivity" /> <category android:name="android.intent.category.DEFAULT" /> should be inside an activity tag like this: <activity android:name="com.mysmartftp.MainActivity" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> action specified by you is wrong and category can be Launcher/Default or something else depending on your requiremnet.

Categories : Android

US Map Plugin Help Required
Use a vector Drawing tool (like Inkscape) to add the Territory names to SVG file then replace the existing Blank_US_Map.svg To implement the link behavior you want change $('#map').usmap({ // The click action click: function(event, data) { window.location.href = date.name+".html"; } });

Categories : Javascript

Required help on javascript
The open() method takes a second name parameter which you can use as the target of a post, so you can create a hidden form with a target, open about:blank with a the target name and submit that form. Or you can have a form that submits to the special '_blank' target which also opens a window. Similarly you programmatically fill and submit the form. Edit: I said '_new' which is wrong....

Categories : Javascript

Cad/Cam maths required
Linear algebra is definitely a good start. Also, you are probably familiar with polygon meshes, that's good too. If I would interview for a CAD job I would read up on other geometry representations. In particular NURBS and Constructive Solid Geometry (CSG). I don't think rendering APIs are too important here, but you should have a solid understanding of how ray tracing works and how to use the just mentioned surface types in both a ray tracer and in a rasterization-based pipeline.

Categories : Misc

Which PHP modules are required by the SDK
One of the things we're concentrating on over the next few releases is providing dev environment that matches what you have in production. For now, you can get the list of loaded extensions that are available in production from php-minishell.appspot.com, and then use that list to tune your dev setup to match. >>> print implode(", ", get_loaded_extensions()); Core, date, ereg, libxml, openssl, pcre, zlib, apc, bcmath, calendar, ctype, dom, filter, gd, hash, iconv, json, mbstring, mcrypt, SPL, session, standard, OAuth, mysqlnd, PDO, pdo_mysql, Reflection, mysqli, shmop, SimpleXML, soap, mysql, tokenizer, xml, xmlreader, xmlwriter, GAE Runtime Module, urlfetch_stream_wrapper_plugin, memcache, memcached, google_cloud_sql_mysqlnd_plugin

Categories : PHP

No value given for one of more required parameters
I think you need to add schema.ini file to solve your problems. So, according to this information you need to go as follows: 1.create text file schema.ini and save it in the folder where your tou.txt file is located. 2.your schemat.ini should looks like: [Tou.Txt] ColNameHeader = True CharacterSet = ANSI Format=TabDelimited Now your code should works for Tou.Txt but could not for other files if they are all in the same folder. If so, you need to add to your schema.ini similar sections for all other text files you import.

Categories : Excel

How to see .p files' required input?
You cannot see the code of a Matlab p-code file. p-code files exists so that one can share code in order that others can't look at it. type on matlab command window; help <p-code file name> (if the corresponding .m has comments sections for its inputs and return values, or other documentations, you can probably see them) You could probably get some idea for its inputs, from the error thrown just by typing the p-code file name.

Categories : Matlab

Optional VB Parameters are required in C#
C# doesn't support optional ref parameters. If you change obj to be a ByValue parameter, it should be fine. If you try to declare an optional ref parameter in C#, you'll violate section 10.6.1 of the C# 4 spec: A fixed-parameter with a default-argument is known as an optional parameter. ... A ref or out parameter cannot have a default-argument. The exception to this is for COM, where ref parameters are extremely common. When the C# compiler knows it's dealing with a COM component, it will allow you to omit optional ref parameters.

Categories : C#

CodeContracts "Required" understanding
It seems that you are trying to do a couple of things at once here: Contract.Requires should be used on the input parameter directly, e.g. if id should never be null, then do like so: Contract.Requires<ArgumentNullException>(id != null); In addition, it seems that you want to guarantee that the result isn't null. Do this like so: Contract.Ensures(obj != null); Similarly, additional contracts can be checked by your helper method (Get).

Categories : C#

Is htmlspecialchars() required on ALL output?
Well, if you don't want XSS problems, then using htmlspecialchars() is a good idea. If you didn't, someone could store a malicious <iframe>, or <script> in your code. Now, you don't necessarily need to protect the output. If you sanitize the data coming in, you can store the sanitized data instead. Doing it this way allows you to purposefully store non-sanitized data for maybe styling purposes which would be ready for output. As far as your example is concerned, it is correct. That is one way you can do it. EDIT: You only need to apply htmlspecialchars() to strings.

Categories : PHP

Lvalue required Error
In C++, the ternary conditional operator takes an assignment-expression as it's third operand, so your expression is understood as: (a >= 5 ? b = 100 : b) = 200; In the "true" case this amounts to: b = 100 = 200; This in turn groups right-to-left, i.e.: b = (100 = 200); This clearly doesn't make sense. What you meant to say is: if (a >= 5) { b = 100; } else { b = 200; } You don't need an expression; a statement is perfectly fine. Alternatively, as Michelle suggests: int b = a >= 5 ? 100 : 200; Note that the ternary conditional operator is different in C, although it looks similar!

Categories : C

Prefix for CSS3 isn't required?
According to caniuse.com (first google result) the vendor prefix will support a few outdated versions of Mozilla and Webkit-based browsers. Link: http://caniuse.com/css-boxshadow

Categories : CSS

Local files required for git?
All of your code should be version controlled, with pretty much no exception besides generated content. Not doing so seems rather counterproductive. If you do want to track just a single directory, make it into its own repository. If you're talking about static assets, you can consider adding your asset directories to .gitignore and distributing them via another channel. To address your added question: your repository should maintain a single state across your machines, i.e. every machine that accesses the code should have a copy of the entire history of the project and its constituent files. That's pretty much the essence of DVCS. When you want to deploy, you pull in the delta from your local copy to the production server.

Categories : GIT

Magento middle name required
To make your Middle Name field Required open the following file: /app/design/frontend/default/[YOURTHEME]/template/customer/widget/name.phtml or if it doesn't exist there, open: /app/design/frontend/base/default/template/customer/widget/name.phtml Look for the following code: <input type="text" id="<?php echo $this->getFieldId('middlename')?>" name="<?php echo $this->getFieldName('middlename')?>" value="<?php echo $this->htmlEscape($this->getObject()->getMiddlename()) ?>" title="<?php echo $this->getStoreLabel('middlename') ?>" class="input-text" <?php echo $this->getFieldParams() ?> /> Where it says class="input-text" make it say class="input-text required-entry" <input type="text" id="<?php echo $this->getFieldId('

Categories : Magento

Why I get 411 Length required error?
When you make a POST HttpWebRequest, you must specify the length of the data you are sending, something like: string data = "something you need to send" byte[] postBytes = Encoding.ASCII.GetBytes(data); request.ContentLength = postBytes.Length; if you are not sending any data, just set it to 0, that means you just have to add to your code this line: request.ContentLength = 0; Usually, if you are not sending any data, chosing the GET method instead is wiser, as you can see in the HTTP RFC

Categories : C#

How to know the Number of Core and RAM Required?
I'll try and list a few constraints that I can think of, but there might be more: webserver with apache running Take a look at the number of file handles that are used (in case apache serves static content like css, javascript or images). Additionally, the number of http connections might be a constraint (normally one per concurrent user). Another constraint might be the number ajp worker threads that pass requests to tomcat. Memory constraints requirements might not be that huge but that depends on what your apache does. app server with Tomcat running Here the size of the sessions would be a constraint. Note that depending on the session timeout, the number of concurrent sessions might be much higher that the number of concurrent users (not all need to do concurrent requests, but

Categories : Java

What is required for a successful php session?
Default practice in PHP these days** when dealing for sessions if for PHP to generate a cookie for the client to store. Your java client must store this cookie (called phpsessid by default, but any PHP programmer worth their salt will change the cookie name), and present it in the HTTP headers on subsequent requests. I'm not very familiar with the HTTP support in Java, but if it's anything like curl it will include options for setting and retrieving cookies. ** It used to be possible to pass session tokens by a query string (a GET parameter) when making the request, but as this was horribly insecure and leaked potentially sensitive information, it's never used any more and may even no longer be available as an option.

Categories : Java

The cipher 'aes256-cbc' is required, but it is not available
You need to add to Your JRE - java unlimited strength policy, eg.: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html Please replace local_policy and us_export_policy on the server's JRE path (libsecurity) Other version of JCE policies can be found on oracle web pages.

Categories : Misc

CSS styling issue help required
I have took a look at your fiddle and when applying the 25% to the width CSS on the .equal and making the width of the .effect 100% nothing seems to have changed. It all seems to work fine and not stick together like you stated. I'm unsure as to what problems you are facing as the fiddle seems to be running fine with the desired percentages.

Categories : HTML



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