Program to check if in line are doubled words

Like in title i made program with check if in text lines are doubled words And in the end shown number of lines without doubled words.

this is example text:

sayndz zfxlkl attjtww cti sokkmty brx fhh suelqbp xmuf znkhaes pggrlp zia znkhaes znkhaes nti rxr bogebb zdwrin sryookh unrudn zrkz jxhrdo zrkz bssqn wbmdc rigc zketu ketichh enkixg bmdwc stnsdf jnz mqovwg ixgken 

I already made program, and It looks that program works. But I’m aware that in programming if something work it doesn’t mean that program is made properly.

My code:

class SkyphrasesValidation(object):     def get_text_file(self):         file = open('C:/Users/PC/Documents/skychallenge_skyphrase_input.txt', 'r')         return file      def lines_list(self):         text = self.get_text_file()         line_list = text.readlines()         return [line.split() for line in line_list]      def phrases_validation(self):         validated_phrases = 0         for line in self.lines_list():             new_line = []             for word in line:                 exam = line.count(word)                 if exam > 1:                     new_line.append(0)                 else:                     new_line.append(1)             if 0 in new_line:                 validated_phrases += 0             else:                 validated_phrases += 1         return validated_phrases      def __str__(self):         return str(self.phrases_validation())  text = SkyphrasesValidation()  print(text) 

Is my logic is good and this program is well made or maybe it looks like poop and I could make this more cleary.

are real computers capable of producing true random series with a program of finite length?

Question: Suppose that one has a Blum–Shub–Smale machine, is it possible to write down a program of finite length that produces a series of numbers, with each consisting of finite number of digits, such that these numbers are truly random in the sense of Kolmogorov randomness, that is, no program of finite length on a Turing machine can produce the same series of numbers?

Display program over logon screen windows

I would like to display a program (just a classic window, who get all the screen) for asking a question on login screen or lock screen.

I already get my popup look like windows BSOD screen.

It’s for executing some scans during night but we don’t know if some user will be there so we want to force the lock screen and display a windows saying we are currently doing somme maintenance task. If anyone is in front of the computer he can validate or discard the task. If he is ok for doing right now, we start scan, if he is not we give him back control. If no response is catch in some delay, we start our task.

I already get some information and code (in C#), but I’m not really programmer (just doing few thing like script, it’s not really writing program). I work more under system and I don’t know how to adapt the code that I found in PowerShell.

Link to C# code : https://web.archive.org/web/20150205131626/http://calebdelnay.com/blog/2012/01/displaying-a-program-on-the-windows-secure-desktop

Any help is welcome.

Paste information from program to datagridview

At work, we use a program to match certain data. I’m currently working on a solution to take those matches and insert them in a database. But in order to do this, I want the matchresults displayed in a datagridview. So far I’ve tried to use a code from this awnser.

The problem that I’m having, is that when I paste the data from the matching program is that it only sets 5 columns, while it needs to be 7. It is caused by the fact that the last two cells of the first row contain no data.

Unfortunately I cannot change the data being copied to the clipboard, so I must change my pasting code accordingly.

The code I currently use is as follows:

    Const tab As Char = ChrW(9)     Const lineFeed As Char = ChrW(10)     Const carriageReturn As Char = ChrW(13)      Dim generate As Boolean = True      For Each line As String In Clipboard.GetText.Split({lineFeed, carriageReturn}, StringSplitOptions.None)          Dim values() As String = line.Trim.Split({tab})          If (generate) Then             For cell As Integer = 0 To (values.Length - 1)                 DataGridView2.Columns.Add(String.Format("C{0}", cell), cell.ToString())             Next             generate = False         End If          DataGridView2.Rows.Add(values)      Next 

Could anyone help me with my problem? Any help would be much appreciated.

PS: the longer code provided by the mentioned solution also causes errors when pasting, so that’s why I don’t use the more elegant code provided.

Creating Service Report app – Is this the right program?

Overview:

We are a small company that is continually growing. Right now we are in the process of moving our service report form from our SharePoint server to SharePoint 365. Part of this process is getting PowerApps involved and creating a much more interactive form compared to the previously static HTML form. I realize that there are plenty of service reporting applications available on the market, but we are set on using SharePoint for this to create a custom experience.


Description of Application:

In order to facilitate their needs of logging Service Reports, the form records standard client information, the person completing the service, the product being serviced, parts used, warranty information, and descriptions of the issues. The information is split between multiple SharePoint lists. (Service Report, Parts Used, Product Descriptions, etc.) Within all of this the application is set up to notify the sales team when reports are created so they can invoice the respective parts and services provided to the customer.


Question:

To me this seems like a bad idea for the long term. It will work for now, but when we get to the point where our service reports need to be more interactive with our other departments, will SharePoint become a hangup?

Do I have the right idea of SharePoint? Is it more of an information storage program? Are we pushing it beyond what it should be used for? Or is this the proper use, making it into what we want it to be?

fclose is causing a crash and works for less than 10k entries when commented. Could someone comment what could be wrong with the below program

Here goes the program    #include <stdio.h>   #include <string.h>   #include <stdlib.h>     void main() {         FILE *fp;         char str[200];         char *tempstr;         char close[65000][10];         char open[65000][10];         char station[65000][20];         static int count;         tempstr=(char *)malloc(200);         bzero((void *)str,200);         system("$  SHELL parselog.sh 52799272_LOG1");         do {               system("head -n 7 tempfile > temp");               fp=fopen("temp","r");               while((fgets(str,120,fp)) != NULL) {                         if(strstr(str,"OPEN")!= NULL) {                                 strcpy(open[count],strtok(str," "));                                 printf("%s\n",open[count]);                         } else if(strstr(str,"CLOSE")!= NULL) {                                 strcpy(close[count],strtok(str," "));                                 printf("%s\n",close[count]);                         }                         else if (strstr(str,"YOURHOSTNAME:")!= NULL) {                                 printf("%s\n",str);                                 bzero((void *)tempstr,200);                                 strcpy(tempstr,str);                                 tempstr = strtok(tempstr," ");                                 printf("tempstr:%s\n",tempstr);                                 tempstr = strtok(NULL," ");                                 printf("tempstr:%s\n",tempstr);                                 strcpy(station[count],tempstr);                                 printf("%s\n",station[count]);                                 count++;                                 bzero((void *)str,200);                                 break;                         }                         //      printf("%s\n",str);                         bzero((void *)str,200);                 }                 system("cp tempfile tmp");                 remove("tempfile");                 system("tail -n +9 tmp > tempfile");                 fclose(fp); //causing the crash when uncommented                 fp=fopen("tmp","r");                 fgets(str,120,fp);                 fclose(fp);                 remove("temp");                 remove("tmp");           }while(str != NULL); 

}

The fclose in line#49 is causing the issue when uncommented it crashes right after parsing 2 entries and when commented it crashes stating there are too many open files.

case 1: free(): invalid pointer Aborted (core dumped)

case 2: cp: cannot create regular file ‘tmp’: Too many open files sh: 1: 1: Too many open files Segmentation fault (core dumped)

Could someone point what is wrong with my program?

Program Please solve in C# [on hold]

enter image description here enter image description here enter image description hereenter image description here A Class Diagram clearly showing the class relationships. in a word document . Include a description of the class diagram that describes each class and indicates why it is a good design. Screen shots of these test cases : Pizza, Large, Cheese, Sausage 60502 Pizza, Large, Cheese, Sausage Pizza, Medium, Cheese 60540 c. Burger, 1/4 Pounder, Cheese, Pickles 60539 d. Wings, 20 Piece, Medium, Blue Cheese Burger, 1/2 Pounder, Cheese 60629 e. Fries, Large Burger, 1/4 Pounder, Pickles, Cheese 60510

COMMISSION FIRE video course affiliate program for $5

Commission Fire EBOOK Discover The Closely Guarded Secret To Earning A 5-Figure, 6-Figure, Even A 7-Figure Paycheck From Commission Alone! What you’ll about to discover is real, proven techniques that top affiliate marketers use to generate 6, 7 figures in commissions alone – DAY IN, DAY OUT…Each promotion takes a little more than 30 minutes of your time setting up in exchange for *massive* dividends and towards becoming a top affiliate marketer 25 MB Commission Fire Video UpgradeCommission Fire Advance course is a 4 part module that teaches you how to master the essential factor in generating sales or any commission online, and that is traffic! By being able to master the essential traffic generation tools such as Facebook Ads, Google Ads, Solo Ads, and Ad Swaps, you’ll literally be able to drive traffic to your site as easy as the push of a button131 MB

by: painkra123
Created: —
Category: Tutorials & Guides
Viewed: 191