text
stringlengths 0
14.1k
|
---|
goto done;
|
}
|
if (!ControlService(hService, SERVICE_CONTROL_CONTINUE, &status))
|
{
|
printf(""[ControlService] Error: %ld\n"", GetLastError());
|
nError = 1;
|
}
|
done:
|
if (hService != NULL)
|
CloseServiceHandle(hService);
|
if (hManager != NULL)
|
CloseServiceHandle(hManager);
|
return nError;
|
}
|
/* EOF */
|
" gpl-2.0
|
Lisergishnu/LTXKit uStripDesign.py 5581 "# -*- coding: utf-8 -*-
|
# @Author: Marco Benzi <[email protected]>
|
# @Date: 2015-06-07 19:44:12
|
# @Last Modified 2015-06-09
|
# @Last Modified time: 2015-06-09 16:07:05
|
# ==========================================================================
|
# This program is free software: you can redistribute it and/or modify
|
# it under the terms of the GNU General Public License as published by
|
# the Free Software Foundation, either version 3 of the License, or
|
# (at your option) any later version.
|
# This program is distributed in the hope that it will be useful,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# GNU General Public License for more details.
|
# You should have received a copy of the GNU General Public License
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# ==========================================================================
|
import math
|
""""""
|
Speed of light constant
|
""""""
|
c = 3E8
|
""""""
|
Vacuum permittivity
|
""""""
|
e0 = 8.8541E-12
|
""""""
|
Vacuum permeability
|
""""""
|
u0 = 4E-7*math.pi
|
def getEffectivePermitivity(WHratio, er):
|
""""""
|
Returns the effective permitivity for a given W/H ratio.
|
This function assumes that the thickenss of conductors is insignificant.
|
Parameters:
|
- `WHratio` : W/H ratio.
|
- `er` : Relative permitivity of the dielectric.
|
""""""
|
if WHratio <= 1:
|
return (er + 1)/2 + ((1 + 12/WHratio)**(-0.5) + 0.04*(1-WHratio)**2)*(er -1)/2
|
else:
|
return (er + 1)/2 + ((1 + 12/WHratio)**(-0.5))*(er -1)/2
|
def getAuxVarA(Zo,er):
|
""""""
|
Returns the auxiliary variable
|
A = (Zo)/60 * math.sqrt((er + 1)/2) + (er-1)/(er+1)*(0.23+0.11/er)
|
This function assumes that the thickenss of conductors is insignificant.
|
Parameters:
|
- `Zo` : Real impedance of the line.
|
- `er` : Relative permitivity of the dielectric.
|
""""""
|
return (Zo)/60 * math.sqrt((er + 1)/2) + (er-1)/(er+1)*(0.23+0.11/er)
|
def getAuxVarB(Zo,er):
|
""""""
|
Returns the auxiliary variable
|
B = (377*math.pi)/(2*Zo*math.sqrt(er))
|
This function assumes that the thickenss of conductors is insignificant.
|
Parameters:
|
- `Zo` : Real impedance of the line.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.