Posts

file - Why is seekp not doing its job? C++/CLI -

my function "writetofile" writing piece of data file @ end of line indicated int variable zone. file set @ beginning text indicate put data, seekp() doesn't seem placing output marker need go. can point out i'm missing please? this file creation in main function: string myfilename = txtboxcont; myfilename.append(".txt"); myfilename="test.txt"; //temporary name, delete before publish <<. ofstream prefile(myfilename, ios::trunc); int i; (i=1;i<=4;i++) prefile << "dc" << << "\n"; prefile << "junk:"; prefile.flush(); prefile.close(); fstream myfile(myfilename,ios::in | ios::out | ios::ate); if (!myfile.is_open()) throw; and writetofile function: (fyi: data "0.95" or "623") void writetofile(fstream &myfile, string& data, int zone) { data = numbercheck(data); //filters out non-numeric data, returns "null" if nothing left. ...

email - GnuPG: Plugin for Outlook that allows searching through encrypted mails -

i have tested gpg4win plugin outlook. when use cannot use outlook search body text in email. i imagine due email being encrypted , outlook searches through encrypted email , not decrypted email. my threat model protect email transfer. email hits our mailserver consider safe store decrypted. imagine solution gpg4win decrypt email using passphrase , store decrypted version on system , local cache, can searched ordinary email. is there way can search through encrypted emails using outlook? ole, should give gp4o try. gpg4o if want can save mail after decryption, can processed indexer. additionally easiest pgp plugin have discovered best regards karl

c# - System.Array does not support Add(), so how does collection initializer work? -

in c# can initialize array so: var example = new int[] { 1, 4, 3 }; as quoted in custom collection initializers : the collection object collection initializer applied must of type implements system.collections.ienumerable or compile-time error occurs. each specified element in order, collection initializer invokes add method on target object expression list of element initializer argument list, applying normal overload resolution each invocation. thus, collection object must contain applicable add method each element initializer. but cannot add system.array, 1 has create new larger array each added item, not performance. how c# work when using collection initializer on array? wonder if write class internal array supports collection initializer. array isn't custom collection. it's array. array initializers pre-date collection initializers, , inspired syntax .

Swift ERROR- [__NSCFData gotoShowChannel11] When i create button in Delegate and add view on tabbar -

i gating problem in ios 8 code working in ios 9 . have create 1 transparent button , add subview in tabbar method. problem button event not working when tabar load second time , problem in ios 8 , working in iso 9. here code delegate var button_oftabbar = uibutton(); //var button_oftabbar:uibutton!; //uibutton();= uibutton(type: uibuttontype.system) in tabbar class tabbar: uitabbarcontroller,uitabbarcontrollerdelegate { //let button_oftabbar = uibutton(); var delegate1: appdelegate! let adatabase : databaseinit = databaseinit() override func viewdidload() { super.viewdidload() uitabbar.appearance().tintcolor = uicolor(red: 242/255.0, green: 134/255.0, blue: 55/255.0, alpha: 1.0) self.delegate=self; delegate1 = uiapplication.sharedapplication().delegate as! appdelegate uitabbar.appearance().bartintcolor = uicolor.whitecolor() if(delegate1.tag_jive_channel_tab == 0) { ...

mysql - django sql thread safe? -

assume have code: product = product.objects.get(name='something') product.number_sold += 1 product.save() if during query number_sold 10, , before save(), code run @ same time query return 10 again, means save number_sold = 11 twice ? in other words, can 2 users running django view can same value number_sold field ? to avoid race condition in multi-thread/process code should use f()-expressions : from django.db.models import f product = product.objects.get(name='something') product.number_sold = f('number_sold') + 1 product.save()

android - How can we make a generic UI in phonegap for all platforms? -

i have been working on cross platform project. beginner phonegap. problem have re-skinned cross platform application. re-skinned whole application using inline css. when run application on different devices ui of application displays differently each device. how can convert generic ui? have looked @ this framework? it mimics natural ui depending on phone using.

android - drawer not covering actionbar -

i want open drawer such covers actionbar. tried using parent linear layout , inside defined toolbar , drawerlayout , working fine thing cant see menu item there.. can open drawer swiping left right on screen. if define toolbar outside of linear layout menu showing actionbar not covered drawer. how achieve both of them simultaneously? here xml file of activity_main <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools" android:background="@color/white" android:fitssystemwindows="true" android:layout_height="match_parent" android:orientation="vertical" tools:context="variofitness.com.schedulekeeper.homeactivity"> <include android:id="@+id/toolbar_actionbar...