Posts

c++ - std::wofstream failing to write long long -

i have 2 streams, 1 read , 1 write (diff. files). std::wofstream origin; std::wifstream attach; origin.open(m_sourcefile, std::ios_base::app | std::ios_base::binary); attach.open(csattachfilename, std::ios_base::in | std::ios_base::binary); appending data file works fine, until gets write operation std::streamoff variable. taking account std::wofstream , output variable "normally" did few times in function. //[...] origin.seekp(0, std::ios_base::end); //go end std::streamoff noffset = origin.tellp(); //int nfilenamelength = ...; origin.write(reinterpret_cast<wchar_t*>(&nfilenamelength), sizeof(nfilenamelength) / sizeof(wchar_t)); //int //nothing wrong here //[...] write more attach.close(); auto c1 = origin.bad(); //false origin.write(reinterpret_cast<wchar_t*>(&noffset), sizeof(noffset) / sizeof(wchar_t)); auto c2 = origin.bad(); //true //[...] write more what cause issue ? note works fine if use std::ofstream instead.

Licensing applications inside a Docker container -

i have application runs on jboss server host name , mac id based license. have ported application runs on jboss-wildfly docker container in windows 7 through oracle virtualbox. need same license based on windows machine's host , mac id work in docker. how best achieve ? also, please let me know of best licensing strategy approach.

java - Default activity not found -

a read of same questions no 1 of them me, asking myself. here android manifest file: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.abcdev.starksproject" > <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:largeheap="true" android:theme="@...

javascript - Loading TypeScript module with submodules in SystemJS -

how load modules systemjs if generated typescript single file containing several sub modules? currently, have larger library named form build in single file containing multiple sub-modules (like packages). generate library file use tsconfig: { "compileroptions": { "target": "es5", "module": "system", "moduleresolution": "node", "noresolve": true, "outfile": "../dist/lib/form.js", "declaration": true, "removecomments": false, "noimplicitany": true }, "exclude": [ "lib", "node_modules" ], "filesglob": [ "**/*.ts" ] } as result, form.js file contains modules, contain classes , on. now want use generated library inside project named shop . every time try use classes sub-modules, systemjs tries load submodules subdirectory instead library itself...

How to implement Email Anonymization Similar to Craigslist -

i developing site protect buyers anonymizing email addresses.similar craigslist's system, when seller needs contact buyer should able send email anonymized address such 142jijisds@mysite.com routed user's email address. but don't know how implement feature.

jquery - How to fix Form over the slider image -

i working on codeigniter , creating website. trying fix user check availability form on slider images didn't output want. here html code: <form action="index.html" class="default-form"> <span class="arrival calendar"> <input type="text" name="arrival" placeholder="arrival" data-dateformat="m/d/y"> <i class="fa fa-calendar"></i> </span> <span class="departure calendar"> <input type="text" name="departure" placeholder="departure" data-dateformat="m/d/y"> <i class="fa fa-calendar"></i> </span> <span class="adults select-box"> <select name="adults" data-placeholder="adults"> <option>adults</option> <option value="1">1 adult...

c - How to parse a file that contains a long list of numbers in each line? -

i have file below: 1 2 300 500 5 117 5 90 45 34 ---- -------------- 34566 7 8 16 8 39 167 80 90 38 4555 and on how each numbers , store 2-dimensional array? so far can read line using fgets() function. file *fp = null; char buffer[1024]; fp = fopen("input.txt","r"); if(fp!=null) { while(fgets(buffer,1024,fp)!=null) { // need here } } is there method of solving (better this) rather using fgets()? #include <stdio.h> #include <stdlib.h> int main(void){ //either two-pass or ensure dynamically allocate , expand `realloc` if size of array can't determined in advance, static int array[20][20]; int row=0; file *fp = null; char buffer[1024]; fp = fopen("input.txt","r"); if(fp!=null) { while(fgets(buffer,1024,fp)!=null){ char *p = buffer, *endp; long num; int col = 0; do{ ...