Save image in the gallery

I got a question how to save a bitmap from my App into the android gallery within a Button? I just want that my bitmap is placed in the gallery that the user can use it to set it as maybe his background. So how is it going? ...
more »

2017-01-11 20:01 (2) Answers

C searching for a word in a string

Im trying to write a code that scans a string from the console and tries to find the same word in a .txt file. Then print the word and print if its a positive or a negative word. The .txt looks like this: agree: POZ beautiful: POZ amazing: POZ ...
more »

2017-01-08 13:01 (1) Answers

MemoryMappedFile without a real file

I can define and use a RandomAccessFile/MemoryMappedFile, which I am using for inter-JVM communication. It's basically a memory-only scratchpad that never needs to actually be written to disk. But starting it up, especially a large one, takes time, ...
more »

2017-01-07 22:01 (0) Answers

StreamReader in textbox

I am trying to use StreamReader to read a text file and display the results in a textbox, but everytime I try to do that, my textbox ends up freezing. The same result in Console seems to work fine. Here is my code so far. private void ReadFile_Click...
more »

2017-01-07 00:01 (3) Answers

VB.Net: Searching Word Document By Line

I'm attempting to read through a Word Document (800+ pages) line by line, and if that line contains certain text, in this case Section, simply print that line to console. Public Sub doIt() SearchFile("theFilePath", "Section") Console.WriteLi...
more »

2017-01-04 20:01 (2) Answers

elm: read file content

Is there a way to read a file in elm? I want to have an xml settings file where I will keep different settings and read it with elm (I've seen this parser, but it expects the xml content, not path). I don't want to use ports and these stuff. I need ...
more »

2016-12-27 12:12 (2) Answers

File size limit for read()?

I'm running into a problem while trying to load large files using Python 3.5. Using read() with no arguments sometimes gave an OSError: Invalid argument. I then tried reading only part of the file and it seemed to work fine. I've determined that it s...
more »

2016-12-24 18:12 (1) Answers

Google Cloud Storage Search Files

I'm developing an application that will serve a lot of file. Lets say it's a car company. Each car has a folder with documents/files for that car. These files are uploaded into categories, represented as "folders" in GStorage. 2 files for 2 different...
more »

2016-12-20 18:12 (1) Answers

Saving random numbers to a text file

I am making a program that randomly generates made-up basketball players with specific 0-100 ratings in 5 categories for each player. To accomplish this, I need to find a way to save the players' ratings so that they don't keep randomly regenerating ...
more »

2016-12-19 19:12 (2) Answers

C# use DLL functions dynamically

I have two folders, one folder with files and the other one with DLL files, I can not know which or how many DLLs there is inside the DLL files directory (modular use). Inside every DLL file there is a function that gets FileInfo as parameter. How c...
more »

2016-12-18 08:12 (3) Answers

Find a specific Google Document in Drive

I am trying to write a script to get the URL of a specific yet dynamic Google Document in Drive. The Google Document is created every Tuesday with its date at the end of the title of the Google Document. "TypeError: Cannot find function getUrl in o...
more »

2016-12-15 00:12 (2) Answers

How to create a file in a specific folder in Ruby

How can I fix the script so that the file is saved in $PWD/source/blog? #!/usr/bin/env ruby require 'fileutils' require 'time' title = ARGV[0].to_s language = ARGV[1].to_s time = timestamp = time.strftime('%Y-%m-%d') utctime = time.getut...
more »

2016-12-12 20:12 (3) Answers

Missing shutdown file on OS X

I have recently moved the shutdown file in /sbin/ directory and I lost the content of the shutdown executable. I can't shutdown the computer because of it. Can someone tell me where can I get this file without reinstalling the OS? Any advice for re...
more »

2016-12-08 20:12 (2) Answers

Saving log files to pc in Android Studio

Is it possible to write log files to my pc? I'm creating a log file inside my android app which i need to analyze on my pc, is it possible to save this file directly to my pc? The app runs on my tablet which is connected via USB. ...
more »

2016-12-05 15:12 (1) Answers

strange system call semantics on nfs mount

I am writing a little test program for the open() function in C @ open SuSE leap 42.2 x64. Unfortunately the file being created gets -rwxrwxrwx permissions, although I hand over 0644 to the open() function after executing umask(0); Could anyone ple...
more »

2016-12-04 16:12 (1) Answers

How to do a prefix search in c#

I have this scenario in c# I use a textbox to enter a string and search for this string through a file, this file contains lines of strings; each line consists of an integer, a delimiter, and a text which I want to display if it's prefix matches the ...
more »

2016-12-02 17:12 (1) Answers