w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
is there software for jar file copy protection, or licensing software
Copy protection can't prevent your file to be copied but you can make it fail when it is run on unlicensed machines. Selection of a copy protection mechanism is a matter of budget and time. There are many companies with many products. You can go with not yet cracked technologies like iLok etc. This is applicable for very high revenue cases. But if your target audience is less than 1000 people then a simple in-house solution might work. Consequence of a complex method is typically many calls to support line and unhappy customers. Things got a lot easier after clients are all connected to internet. You can make some simple parts to run on server which a cracker would never dive into for a replacement. Or the app might download the contents from server after installation. Latter is what I d

Categories : Misc

How to install a software and then run java class from batch file
If the Java doesn't work have you tried to launch the batch without "Setup.exe"? @echo off cd ACR122U_MSI_Winx64_1120_P REM Setup.exe java -cp zpay-client-1.5-jar-with-dependencies.jar;. esources com.abc.posgui.LicenseValidator Otherwise, are you sure that the installation has stopped?

Categories : Java

Copy file from Puppet master to agent unless software is installed
The way i tackle this, and there might be a better ways to do this : Create a module for installing the product In that module, write a custom fact for discovering the version installed In the installer class, wrap everything in an 'if' i.e. class productx::install ( $version, $installer_path, ) { # productx_version is a fact if ! $::productx_version { do the install } } You can do other neat stuff then, like audit the software in your environment

Categories : Ruby

How to install and run gaia astronomical software from starlink-hikianalia
Steps for installing Starlink Gaia Download the latest Starlink distribution (Hikianalia, as of this writing): http://starlink.jach.hawaii.edu/starlink/HikianaliaDownload Uncompress the .tar.gz. A new star directory will be created. You can move it some other place (for instance, /Users/Shared/star, or /star) As the installer is 0.7GB, you might want to delete it after installation has been successful. Depending on your default shell: For C (csh, tcsh) shells: Create a STARLINK_DIR environment variable pointing to where the star directory is to be left (i.e., /Users/Shared/star): setenv STARLINK_DIR /Users/Shared/star Source the chsrc files source $STARLINK_DIR/etc/login source $STARLINK_DIR/etc/cshrc You can combine the steps above creating an alias called start_starlink to

Categories : Osx

How to install Software Manager (from Linux Mint) in Xubuntu?
You will need to have the latest version of Python installed as this is what actually runs Software Manager then in Synaptic Program Manager look for Software Manager or Software Center and tick for installing an next reboot then apply then submit then reboot and when the system reboots the system should start downloading Software Manager and install it and then you should be able to find it in the start menu.

Categories : Misc

Check For A Software Installation & Install Directory In Windows with C/C++
It is quite hard to answer this because you did not mention the scenarios in which the install directory would be changed. If you are able to change the install directory, why dont you try something like this C:Program Files (x86)your_folder_name? This way, your install directory wont be changed by other users.

Categories : C++

build software from source code and install it in custom folder on Linux
Assuming you want to install a software called 'test'. #!/bin/bash # Set this to where you want to install all the software PREFIX=/usr/oma/sardar/software export CC=/usr/bin/gcc export CXX=/usr/bin/g++ export QTDIR=/usr/lib/qt-4.6 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig # Get sources mkdir -p $PREFIX/src/{BUILD,SOURCES} wget -U temp -P $PREFIX/src/SOURCES http://url/test.tar.gz wget -P $PREFIX/src/SOURCES http://url/test.patch # Unpack sources tar xvzf $PREFIX/src/SOURCES/test.tar.gz -C $PREFIX/src/BUILD # Compile Test cd $PREFIX/src/BUILD/test patch < $PREFIX/src/SOURCES/test.patch ( export CFLAGS="-I$PREFIX/include" export LDFLAGS="-L$PREFIX/lib -Wl,-R$PREFIX/lib" ./configure --prefix=$PREFIX ) make make install

Categories : Linux

Uploading file to dropbox (via syncing)
You can use the chooser for ACTION_SEND with Intent i = new Intent(Intent.ACTION_SEND); i.setType("file/*"); i.putExtra(Intent.EXTRA_STREAM, Uri.parse(filePath)); startActivity(Intent.createChooser(i, "Upload file"); Or explicitly get the Intent via PackageManager.getLaunchIntentForPackage() for the Dropbox package com.dropbox.android.

Categories : Java

How to install/configure new software in newly created amazon instances using Amazon SDK in java?
The Amazon API primarily controls infrastructure. It does not have any control as to what happens inside the instance. There are a couple of ways you can bootstrap your instance and install software. You can use user-data to pass a script that will run on first launch. You could use a provisioning system like chef or puppet. You could roll your own if it works better for you.

Categories : Amazon

Syncing a file system that has no file on it
From man 8 sync description: "sync writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; The sync program does nothing but exercise the sync(2) system call." So, note that it's all about modification (modified inode, superblocks etc). If you don't have any modification, it don't have anything to sync up.

Categories : Linux

Can I tell which software generated a PDF file?
You can try opening the file in Adobe Read and look at the properties. You can find this in: File -> Properties in Adobe Reader after you open the pdf file.

Categories : Pdf

Component install error: JInstaller: :Install: File does not exist
check if you have added this code to your XML: <languages> <language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.ini</language> <language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworldt.sys.ini</language> </languages> and: <administration> ... <languages> <language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.ini</language> <language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.sys.ini</language> </languages> ... </administration> and check if the files are included in your installation ZIP - in right folder, e.g.: language/en-GB/ ... Be aware, the path to the file can be different for

Categories : PHP

File size grows each time software deployed
The file you are looking at in your Program Files folder is probably not the only file you are deploying. A closer examination of your Setup project will probably help you to see what else is being deployed: Click on the arrow to the left of your Setup project in Visual Studio. Then click the arrow next to Detected Dependencies (if it's there). Everything listed there also has to be deployed, unless it is marked excluded: Next, right-click on the Setup project, go to view, and click File System. Click on each folder to see what is being deployed there. Assuming that you used mostly default settings in this Setup project, this probably represents the bulk of what is being deployed. One of these files is probably growing when you make your changes.

Categories : Visual Studio 2010

Copy vector struct to file using ostream_iterator and copy
You'll need to overload operator<< for AccDetails. It is what ostream_iterator calls internaly. Something like this: std::ostream& operator<<(std::ostream& stream, const AccDetails& obj) { // insert objects fields in the stream one by one along with some // description and formatting: stream << "User Name: " << obj.username << ' ' << "Real Name: " << obj.name << ' ' << obj.topicid << ' ' << obj.testid << ' '; return stream; } The operator takes the stream it inserts to as first parameter and a constant reference to the object it is streaming as the second one (this allows passing temporary AccDetails, too). Now you can also say: AccDetails acc; std::cout <&

Categories : C++

Best practice to create a config file for an existing software programmatically
Are there any constraints on the format of the config file? If not, use YAML (or similar) with two config files: default.yml and deploy.yml. Put the defaults for non-required config params in default.yml and then have Vagrant/Chef/Ansible/bash/whatever write the deploy.yml file. On launch, your app reads both config files, giving precedence to deploy.yml.

Categories : Java

Is it possible **to change an .sql file extension to like .myname** and still the software like wamp or sqlite can still read it?
Using sqlite3 in Python you can select any arbitrary file extension (as long as [a-zA-Z]{1,...}) without hindering the module in accessing the database-file. Note, however, that changing a default file-extension to a different arbitrary one does not increase (or decrease for that matter) security of the data stored in the database in any way. You'd have to test if other (SQLite-)implementations allow custom extensions as well, but either way, it would have not impact whatsoever on security.

Categories : Mysql

compiling embedded axis camera software using opencv. Make file changes
You will need core and highgui modules then (libopencv_core, libopencv_highgui). Check modules/highgui/include/opencv2/highgui.hpp and modules/highgui/src/cap.cpp. In the second one there are procedures for most of functions You are looking for. The similar named functions are connected with fact, that OpenCV uses other libraries for video streams. If You are not going to use image processing capabilities of OpenCV it might be a better idea to take a look at libraries specialised in image/video reading and writing.

Categories : Opencv

i need to copy and then rename the copy of a file if it already exists
Try this code, let me know if it works Function <?php function recursive_naming( $file, $i = 1 ) { $dirname = dirname( $file ).DIRECTORY_SEPARATOR; $filename = pathinfo( $file, PATHINFO_FILENAME ); $extension = pathinfo( $file, PATHINFO_EXTENSION ); if ( !file_exists( $file ) ) { return $file; } $filename = preg_replace( '/_d+$/', '', $filename ); $file = $dirname.$filename."_".$i.".".$extension; $i++; return recursive_naming( $file, $i ); } ?> Example: <?php $pastaTemp = $_FILES['imagem_principal']['tmp_name']; $pastaUpload = $_SERVER['DOCUMENT_ROOT']."/casaunica/imagens/acabamentos/"; $arquivo = recursive_naming( $pastaUpload.$_FILES['imagem_principal']['name'] ); ?> It will output filename_2.jpg if fi

Categories : PHP

Batch file to read txt file with file names then search for that file and copy to folder
you can try this: FOR /D /R "%~dp0" %%I IN (*) DO for /f "usebackq delims=" %%a in ("%~dp0list.txt") do xcopy "%%~I\%%~a" "C:your_files" /e /i For more help show list.txt.

Categories : Windows

Generate the .bat file that will copy the selected lines from the .bat file (within .bat file) to another text file
Use the lines as below Echo The land is beautiful >> %_file% echo I wanna stay here >> %_file% echo etc........ >> %_file% echo etc........ >> %_file%

Categories : Batch File

Get software's information in WiX from software
The WiX.chm documents all the standard binder variables at the bottom of the topic titled Linker (light). It does not appear the those pieces of information are available. However, it might be something you could work with the WiX toolset community with to get the code added.

Categories : Wix

Android: File not showing up on file system while trying to copy SQL file from assets to app data directory
I had to override the getReadableDatabase function for the helper class because it has no idea to return myDatabase. The helper loads it up properly and everything, but it never actually returns it. @Override public SQLiteDatabase getReadableDatabase(){ return myDataBase; }

Categories : Android

FileInfo finds file, but File.Copy cannot find the file
What does latestFile.ToString() evaluate to? That is a strange way to obtain the path. Use FileInfo.FullName like the docs indicate. You can use the debugger to find such bugs yourself.

Categories : C#

To create a copy of object in java w/o clone,copy constructor and copy factory
You can just create a new object for NewDog using OldDog Have you considered something like this? NewDog dog = new NewDog(someOldDogObject); While constructor of NewDog can be. public NewDog(OldDog oldDog){ this.dogWeight = oldDog.dogWeight; // keeping the same weight this.dogName = "newDog" + oldDog.dogName; // changing your dog name as per rquirement. }

Categories : Java

Powershell remote install .exe file errors and not finding setup.iss file
Not sure if you are running into the double-hop problem on not, but it sounds like you are. So I though I'd give you a little more information about it. The Bob Loblaw version. What is a server and what is a client? A server, it accepts things, is the computer you remote onto. A client, it gives things, is the computer you use to do the remoting. So in the command Invoke-Command -computername xxxxxxxxxxx.edu ..., "xxxxxxxxxxx.edu" is the server. From your description, it looks like you already ran the command Enable-PSRemoting on your server. With remoting enabled on the server you should be able to do Enter-PSSession -ComputerName xxxxxxxxxxx.edu and have an interactive command prompt on the client. If you enter a remote session and do Get-ChildItem "\ComputerNameShare" the command is

Categories : Networking

WIn764b: Cannot open include file: 'winsock2.h': No such file or directory when running npm install -g karma
binding.sln was built with Visual Studio 2010. I decided to install Visual Studio 2010. I selected "Or, download the previous: Visual C++ 2010 Express." from http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express and npm install -g karma ran without errors.

Categories : Visual Studio

Why does mmap() fail with permission denied for the destination file of a file copy program?
From the mmap() man page: EACCES A file descriptor refers to a non-regular file. Or MAP_PRIVATE was requested, but fd is not open for reading. Or MAP_SHARED was requested and PROT_WRITE is set, but fd is not open in read/write (O_RDWR) mode. Or PROT_WRITE is set, but the file is append-only. You are opening your destination file with O_WRONLY. Use O_RDWR instead. Also, you should use memcpy to copy the memory rather than using your own loop: memcpy(dest, orig, info.st_size); Your loop has an off by 1 bug.

Categories : C

Unable to copy file "objx86debugmyForm.exe" The process cannot access the file ... error
Try close, dispose and then release the reference to the service. This MSDN article talks about it: http://msdn.microsoft.com/en-us/library/3cc9y48w.aspx private void Form1_FormClosed(object sender, FormClosedEventArgs e) { sc.Close(); sc.Dispose(); sc = null; //kill is unnecessary. I'd just stick with app exit. System.Diagnostics.Process.GetCurrentProcess().Kill(); Application.Exit(); }

Categories : C#

Not able to copy file from other file completely with both files opened in binary mode
You're using fprintf() to write the data. The %s indicates a string. I would guess you have a zero byte in the data which terminates the string. I'd use fwrite() instead. (See tutorial).

Categories : C

Batch File to Copy and Rename SQL Backup File created Today
if %mydate2%==%mydate% RENAME %%I DBRestore.bak DO COPY %%I E:DataRestore & exit /b The above lines are not valid batch syntax. You cannot have an if with a condition, but no action. You cannot use loop variables (%%I) outside a loop. do is only a valid keyword in for loops. Also, you don't need to determine the current date via date /t. There's a variable %DATE% providing that information. Your script should probably look somewhat like this: @echo off setlocal EnableDelayedExpansion echo deleting previous file..... del E:DataRestoreDBRestore.bak /f set mydate2=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2% for /F %%I in ('dir /B /O:D *.bak') do ( set "filename=%%~fI" set "temp=%%~tI" set "mydate=!temp:~6,4!!temp:~0,2!!temp:~3,2!" echo last modified file date is !mydate!

Categories : Batch File

DOS Batch file - Copy file based on filename into folder
I don't remember any apparent way to do it other than a UNIX shell... Maybe get MSYS and use that (outdated) bash to help? Here is a bash script that can use after you installed bash from MSYS (or you can sort it with a Linux box - Ubuntu is no bigger than 800MB and can run as LiveCD without interfering your current Windows system, and the LiveCD can double as a system saver when needed. :-) #!/bin/bash for each in ./*; do if [ -d $each ]; then # Only folders are minded. # Extract the second part of the folder name. ACCOUNT_NAME=`echo $each | sed "s/\-/ /" | head -n 2 | tail -n 1` cp -v ./$ACCOUNT_NAME*.pdf $each fi done

Categories : Batch File

File operation to copy one .mp3 file to create another same file
getc() returns either an int, not a char. It needs to return int because it returns either the next byte read from the stream as a value between 0 and 255, or the value EOF, which is typically -1. Since there are 257 possible outputs, you need to be able to distinguish between the byte 255 and the sentinel EOF, but your code is conflating the two. Hence, once you hit the first byte with value 255, it erroneously cuts the file off short. If you change c to be int instead of char, it should work correctly.

Categories : C

How to copy file from HDFS to the local file system
bin/hadoop fs -get /hdfs/source/path /localfs/destination/path bin/hadoop fs -copyToLocal /hdfs/source/path /localfs/destination/path Point your web browser to HDFS WEBUI(namenode_machine:50070), browse to the file you intend to copy, scroll down the page and click on download the file.

Categories : Hadoop

batch file to copy newest backup file
Unless there are thousands of files then this doesn't need the break from the loop. @echo off pushd "J:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLBackupCommonInterface" for /f "delims=" %%x in ('dir "*.bak" /B /O:D') do set "NEWEST_BAK=%%x" copy "%newest_bak%" "F:ackup ew.bak" popd Pause The transaction log backups will have to either be excluded and we need to know the naming scheme, or if the most recent file is always what you need then the above will work.

Categories : Batch File

Maven plugin: copy a file content into another file
In general with Maven, you must first thinkg WHAT you want to do. Might seem weird at first sight, but as Maven is an opinionated build tool, it will generally be not simple to do weird/workaround things ;-). Here, you would need two things: load that file into a "content" property (before resource filtering starts by binding to an early phase, obviously, see the next point) just activate resource filtering and be done Unfortunately, there's no well-known/standard plugin for the (1) able to load a file inside a property. A possible way, before rewriting it through a dedicated plugin or so, would be by using antrun-maven-plugin (through LoadFile task?) or gmaven plugin to load that file into a property (during the initialize phase, for example, so that it happens before process-resou

Categories : File

How to copy file in iCloud to app sandbox using File Manager
You can't just copy a file from iCloud to a local directory, because the file might not exist on the local device yet. Your app's iCloud files are only downloaded on demand, and you haven't done anything to create that demand. As a result, there's no source file to copy. Even if you know the file is in the cloud, you can't access it until it exists locally. If you were checking the error parameter you passed to copyItemAtURL:toURL:error: you might already know this. To download the file you use -[NSFileManager startDownloadingUbiquitousItemAtURL:error:]. That begins the process. You can find out when the download finishes using one of: NSMetadataQuery, which will post an update when the download finishes, or NSFileManager, which won't notify you but which does have a NSURLUbiquitousIte

Categories : IOS

Read file, copy line to clipboard and copy next line when user pastes clipboard, in JS
Rather than looping all in one go, you need to increment your loop in the listener for the paste event. (function () { // scope closure var lines = [], i = -1; // initial `i` -1 so `i + 1 === 0` => first item function setClipboard() { // modify to next item in `lines` i = (i + 1) % lines.length; // make `i` go back to 0 if at end window.clipboardData.setData('Text', lines[i]); } $.get('list.txt', function(data) { lines = data.split(' '); // give lines it's data setClipboard(); // initial }); $('#text').bind("paste", function(e) { $("#output").html(window.clipboardData.getData('Text')); setClipboard(); // change to next line }); }());

Categories : Javascript

Time-based syncing for iOS app
You should do everything in terms of UTC to avoid time zone issues. That doesn't get round the issue of the users clock just being set incorrectly so you may want to check-in to the server when data is updated to verify what the actual time is. There will be some conditions that are hard to deal with if you have no net connection. Sometimes the best you can do is to detect them and tell the user about the risk.

Categories : IOS

Syncing Uncommited Changes Between Computers
As long as you are working in your separate branch, you can commit changes while they are not actually ready. To reduce number of work-in-progress commits, you have 2 choices: Amend your work-in-progress commit every time. But that would require you to force-push your branch. That is only acceptable if no one else uses your branch. Keep making commits until you're done. Then, when merging your branch to master, squeeze all your commits to a single one.

Categories : GIT

Is there a way to update a file in SVN from a non-working copy of the file?
You can setup a cron job to rcp the file to your development server. You will have a checkedout copy in dev server. The script under cron will copy the file to the working copy in dev server (essentially overwrite as you said). You can then checkin the file from the dev server.

Categories : Svn

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