Some time ago I was wondering the following question:
What is the difference between:
$(document.body)
$('body')
If you could explain me, it would be of great help.
Some time ago I was wondering the following question:
What is the difference between:
$(document.body)
$('body')
If you could explain me, it would be of great help.
I am trying to create two borders one on the left and one on the right and the main text is in the middle of the two borders.
An example to idea to what I am trying to achieve I have uploaded two sample images.
I tried doing it this way but the two lines come together.
<div class="www">
<h4><span class="lineseparator"></span>
TITLE NOT TITLE
<span class="lineseparator"></span>
</h4>
<p>Content and content and contecnt</p>
</div>
I tried this other way but same problem.
<div class="www">
<span class="lineseparator"></span>
<h4>TITLE NOT TITLE</h4>
<span class="lineseparator"></span>
<p>Content and content and contecnt</p>
</div>
Execution:
* {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-size: 13px;
font-family: 'OpenSans', 'cursive', 'Releway', Roboto, Lato, Utsaah;
background-color: #FBFBFB;
}
.www {
position: relative;
padding-top: 35px;
}
.lineseparator {
height: 1px;
border-top: 1px solid #000;
display: block;
position: relative;
top: 12px;
width: 20%;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 300;
}
p {
font-size: 15px;
line-height: 24px;
font-weight: 300;
}
<div class="www">
<span class="lineseparator"></span>
<h4>TITLE NOT TITLE</h4>
<span class="lineseparator"></span>
<p>Content and content and contecnt</p>
</div>
<br><br><br>
<div class="www">
<h4><span class="lineseparator"></span>
TITLE NOT TITLE
<span class="lineseparator"></span>
</h4>
<p>Content and content and contecnt</p>
</div>
What I want to achieve is the following example I take it from a website.
And that when making responsive it adapts in the following way.
Hello I have the following code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <dirent.h> // Libreria encargada del tema de los directorios
#include <string.h>
void load(){
char dir[250];
DIR *carpeta;
struct dirent *archivo;
CLEAR
printf("Arrastre la carpeta a la ventana o ingrese la direccion para indexar\n");
fgets(dir,250,stdin);
carpeta = opendir(dir);
if (carpeta != NULL){
while ((archivo = readdir(carpeta))) puts (archivo->d_name);
closedir(carpeta);
}else
perror ("Error al abrir el directorio ");
getchar();
}
Given an address of a folder, it lists the files inside it, the problem is that it just doesn't read the files when I drag them to the console, but it does when I type the address directly into the file.c
Here drag the folder to the window:
Here I made a change in the code and directly entered the same address of the folder that I dragged
carpeta = opendir("/Users/cristoferfb/Documents/Universidad");
As you can see on the second occasion it performs its task without any problem.
It should be noted that when entering folders with spaces in the names, strange symbols are generated:
those \
are not part of the name and I have tried to remove them but in the end it does not work either.
ps: I am working under macOs Sierra with gcc
How can I get the real IP address of the client from PHP
if possible.
This means that there is a direct connection, or through a proxy
, or router
or whatever, I always identify the IP
real one of the client computer.
I have a C# function that reads the mapped drives on the system and displays a list of the network drives. For this I am using ManagementObjectSearcher
a query that returns the mapped logical drives.
I've been looking at the different properties and I can't find any that indicate if that unit is persistent or not (something that seems to be available if it is an online unit). Is there a property to see the persistence of the mapped drive? If not, how could it be checked?
The code I have looks like this (simplified):
using System;
using System.Collections.Generic;
using System.Management;
class MappedDrive
{
public char Letra { get; }
public string Ruta { get; }
public bool Persistente { get; }
public MappedDrive(char Letra, string Ruta, bool Persistente)
{
this.Letra = Letra;
this.Ruta = Ruta;
this.Persistente = Persistente;
}
// devuelve una lista de las unidades mapeadas en el sistema
public static List<MappedDrive> getUnidadesMapeadas()
{
List<MappedDrive> unidades = new List<MappedDrive>();
ManagementObjectSearcher buscador = new ManagementObjectSearcher("select * from Win32_MappedLogicalDisk");
foreach (ManagementObject unidad in buscador.Get())
{
unidades.Add(
new MappedDrive(
unidad["Name"].ToString()[0],
unidad["ProviderName"].ToString(),
true // <--- Esto es lo que no sé cómo leer
)
);
}
return unidades;
}
static void Main(string[] args)
{
List<MappedDrive> du = getUnidadesMapeadas();
foreach (MappedDrive unidad in du)
{
Console.WriteLine("{0}: mapeada a {1} (persistente: {2})", unidad.Letra, unidad.Ruta, unidad.Persistente);
}
}
}